Frame:EnableKeyboard()

From Wowpedia
Jump to: navigation, search

Allows this frame to receive keyboard input via OnKeyUp and OnKeyDown script handlers.

frame:EnableKeyboard(enableFlag)

Arguments

enableFlag 
Boolean - Whether to enable (true, default) or disable (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.

See also