/trunk
local name = k:GetName() |
KA.oldShow[name] = k:GetScript('OnShow') |
k:SetScript('OnShow',function(...) |
tinsert(KA.handleT,name) |
KA.handler:EnableKeyboard(1) |
if not ( k.which =='REPLACE_ENCHANT' or k.which=='DEATH' or k.which=='RECOVER_CORPSE_INSTANCE' or k.which=='BUYOUT_AUCTION') then |
tinsert(KA.handleT,name) |
KA.handler:EnableKeyboard(1) |
end |
KA.oldShow[name](...) |
end) |
end |
KA.handler:SetScript('OnKeyUp',function(self,key) |
if key=='ENTER' then |
local frame = _G[KA.handleT[1]] |
if frame.which == "REPLACE_ENCHANT" or frame.which=='DEATH' or frame.which='RECOVER_CORPSE_INSTANCE' then |
if frame.which == "REPLACE_ENCHANT" or frame.which=='DEATH' or frame.which=='RECOVER_CORPSE_INSTANCE' or frame.which=='BUYOUT_AUCTION' then |
tremove(KA.handleT,1) |
if #KA.handleT==0 then |
self:EnableKeyboard(0) |