Quantcast WoWInterface - View Single Post - OnKeyDown script while EditBox has focus
View Single Post
08-05-18, 11:12 AM   #1
7strm
A Murloc Raider
Join Date: Aug 2016
Posts: 9
OnKeyDown script while EditBox has focus

I'm trying to build a functionality that by pressing tab lets me cycle through channels (with ChatMenu_SetChatType?) while the editbox is open. Essentially like the Overwatch editbox, if you know how that one behaves.

However, while the edit box has focus, I can't seem to listen to keystrokes with an OnKeyDown script at all.

Do you have an idea how to work around this?

Code:
local ksf = CreateFrame("Frame")
ksf:SetFrameStrata("DIALOG")
ksf:EnableKeyboard()
ksf:SetPropagateKeyboardInput(true)
ksf:SetScript("OnKeyDown", function(key)
    print(key)
end)
This works only when the editbox does not have focus.
  Reply With Quote