WoW:API IsShiftKeyDown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m ({{wowapi}}, returns / result.)
("IsControlKeyDown", not "IsCtrl")
Line 1: Line 1:
{{wowapi}}
{{wowapi}} __NOTOC__
Returns true if the shift key is currently depressed.
Returns true if the shift/ctrl/alt key is currently depressed.


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


----
== Arguments ==
;''Arguments''
:''none''


:''none''
== Returns ==
:;Boolean : 1 (true) if the given key is currently held down, nil otherwise.


----
== Related Events ==
;''Returns''
:[[Events/M#MODIFIER_STATE_CHANGED|MODIFIER_STATE_CHANGED]] - fires when shift/ctrl/alt keys are pressed or released


:;Boolean : 1 (true) if SHIFT is currently held down, nil otherwise.
== Example ==


----
;''Example''
   if ( IsShiftKeyDown() ) then DoSomething(); end
   if ( IsShiftKeyDown() ) then DoSomething(); end
;''Result''
true | nil

Revision as of 12:06, 4 July 2007

WoW API < IsShiftKeyDown

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

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

Arguments

none

Returns

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

Related Events

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

Example

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