Frame:EnableKeyboard

From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Frame:EnableKeyboard
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png OnKeyUp
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png OnKeyDown

Allows this frame to receive keyboard input.

Frame:EnableKeyboard([enable])

Arguments

enable
boolean? = false

Details

  • The frame must be shown to receive keyboard events.
  • The top-most (as determined by EditBox input focus, strata, and frame level) keyboard-enabled frame receives keyboard events through the OnKeyUp and OnKeyDown script handlers. The event is also dispatched to frames below it, until it encounters frame which does not propagate keyboard input (controlled by Frame:SetPropagateKeyboardInput) at the end of its OnKey* script handler.
  • Be careful: bindings are handled on the WorldFrame, which is bottom-most: thus, any keyboard-enabled frame which does not propagate keyboard input will prevent all keyboard bindings from functioning while it is visible.