Navigation menu

WoW:UIHANDLER OnKeyUp: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page UIHANDLER OnKeyUp to WoW:UIHANDLER OnKeyUp without leaving a redirect
(fixed typo)
 
m (Move page script moved page UIHANDLER OnKeyUp to WoW:UIHANDLER OnKeyUp without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{widgethandler}}
{{widgethandler}}<br>


== Description ==
== Description ==


The OnKeyUp handler is called when the user releases a key and this frame is registered for keyboard events with [[API Frame EnableKeyboard|Frame:EnableKeyboard]].  See also [[UIHANDLER OnKeyDown|OnKeyDown]].
The OnKeyUp handler is called when the user releases a key and this frame is registered for keyboard events with [[API Frame EnableKeyboard|Frame:EnableKeyboard]].  See also [[UIHANDLER OnKeyDown|OnKeyDown]].
It should also be noted that the [[frameStrata]] has to be at least DIALOG or higher for this to work.


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 <code>runOnUp</code> attribute of a key binding, and check the <code>keystate</code> 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 [[UIOBJECT EditBox|EditBox]] isn't flexible enough.
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 <code>runOnUp</code> attribute of a key binding, and check the <code>keystate</code> 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 [[UIOBJECT EditBox|EditBox]] isn't flexible enough.
Anonymous user