Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » Lua/XML Help » OnKeyDown script while EditBox has focus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off