CommunityDKP

CommunityDKP

194k Downloads

Hotkey to start auctions quickly from the inventory or item links

f90 opened this issue ยท 1 comments

commented

Is your feature request related to a problem? Please describe.
Problem: Starting bids with /dkp bid [item] is slow and tedious

Describe the solution you'd like
When pressing a certain key combination (should be configurable), e.g. shift+alt, then the item in the inventory that the mouse cursor is currently hovering over should be used to open the auction setup window, just like /dkp bid [item]

Additional context
Made an addon that announces items in raid warnings this way, see the code below. Key is to use

local item, itemlink = GameTooltip:GetItem()

upon detecting the key press combination, and whatever item tooltip is currently displayed (this means it works for items posted in chat too!) is then used as item

Raid announce addon code:

local function printItem()
    local item, itemlink = GameTooltip:GetItem()
    if itemlink ~= nil then
        if IsInRaid() and (UnitIsGroupAssistant("player") or UnitIsGroupLeader("player")) then
            SendChatMessage(itemlink, "RAID_WARNING")
        end
    end
end

local f  = IAKeyEventFrame or CreateFrame("Frame", "IAKeyEventFrame", UIParent)
local function onKeyPress(self, key)
    -- print(key)
    if key == "LALT" and IsControlKeyDown() then
        printItem()
    elseif key == "LCTRL" and IsAltKeyDown() then
        printItem()
    end
end

local function PrintClick(self, button, down)
   print(self:GetName(), button, down)
end

f:SetScript("OnKeyDown", onKeyPress)
f:SetPropagateKeyboardInput(true)
commented

Thanks for implementing this, works well!