Wikia

WoWWiki

API IsShiftKeyDown

Talk0
101,312pages on
this wiki
Revision as of 01:30, March 8, 2009 by Govtgeek (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < IsShiftKeyDown

Returns true if the shift/ctrl/alt key is currently depressed.

shiftDown = IsShiftKeyDown();
ctrlDown  = IsControlKeyDown();
altDown   = IsAltKeyDown();

Arguments Edit

none

Returns Edit

Boolean 
1 (true) if the given key is currently held down, nil otherwise.

Related Events Edit

MODIFIER_STATE_CHANGED - fires when shift/ctrl/alt keys are pressed or released

Example Edit

 if ( IsShiftKeyDown() ) then DoSomething(); end

Note Edit

These functions will only return true if one of the keys is considered a modifier. If the code executing is started with Shift/Control/Alt as part of the key binding, it will return nil. Govtgeek (talk) 01:30, 8 March 2009 (UTC)

Around Wikia's network

Random Wiki