UIHANDLER OnKeyDown
Jump to navigation
Jump to search
Fires when pressing a key.
(self, key)
Arguments
- self
- Frame - The widget receiving input.
- key
- string - The key represented by a UTF-8 character or a control word such as "ESCAPE", "BACKSPACE", and "LSHIFT".
Details
- Fires before OnChar (which can repeat while the button is held down). Usually followed by OnKeyUp when released.
- Requires keyboard input, which another Frame can block with Frame:SetPropagateKeyboardInput.
- EditBox also requires edit focus. Fires before OnEscapePressed, OnBackspacePressed and OnTextChanged.
See also
- Creating key bindings - An alternative more suited to handling game actions.