Widget handler: OnKeyUp

From AddOn Studio
Revision as of 12:41, 29 August 2006 by WoWWiki>Scotsalmon (fixed typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Widget handlers < OnKeyUp

Description

The OnKeyUp handler is called when the user releases a key and this frame is registered for keyboard events with Frame:EnableKeyboard. See also OnKeyDown.

Note that if you think you want to use this handler to take an in-game action based on a keypress, you probably really want to enable the runOnUp attribute of a key binding, and check the keystate variable and act accordingly. See HOWTO: Use Bindings.xml to create key bindings for your AddOn. This handler is more appropriate for cases where you want to allow freeform text entry and an EditBox isn't flexible enough.

Arguments

arg1 - returned as a string representing the key that was released. For example, "W" or "A" or "S" or "D" (main keyboard keys) or "UP" or "LEFT" or "DOWN" or "RIGHT" (arrow keys) or "DELETE" or other extended keys or "SHIFT" or other modifier keys.