WoW API < IsShiftKeyDown

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

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

Arguments[edit | edit source]


Returns[edit | edit source]

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

Related Events[edit | edit source]

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

Example[edit | edit source]

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

Note[edit | edit source]

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)

These functions actually return the value 1 at this time (when evaluated true).  After the WoD 6.0 API goes into affect the values returned will be boolean true and false (nil).

Community content is available under CC-BY-SA unless otherwise noted.