API IsModifierKeyDown

From Wowpedia
Jump to: navigation, search

There are three seperate levels of IsModifierKeyDown() type API functions but they all do the same basic function and return true if the specified key is currently pressed down.

Is Any Modifier Key Down

Returns whether ANY modifier key is currently pressed down.

anyModKeyIsDown = IsModifierKeyDown();

Is One Key Type Down

Returns whether a specific modifier key type is currently pressed down.

aShiftKeyIsDown = IsShiftKeyDown();
aAltKeyIsDown = IsAltKeyDown();
aCtrlKeyIsDown = IsControlKeyDown();

Is Specific Modifier Key Down

Returns whether a specific modifier key is currently pressed down.

theLeftShiftKeyIsDown = IsLeftShiftKeyDown();
theLeftAltKeyIsDown = IsLeftAltKeyDown();
theLeftCtrlKeyIsDown = IsLeftControlKeyDown();
theRightShiftKeyIsDown = IsRightShiftKeyDown();
theRightAltKeyIsDown = IsRightAltKeyDown();
theRightCtrlKeyIsDown = IsRightControlKeyDown();

Returns

All of the functions mentioned above return the same values:

true if specified key or keytype is currently pressed down, false otherwise.

Additional Clarification

anyModKeyIsDown = IsModifierKeyDown();

is the same as using:

anyModKeyIsDown = (IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown());

As well as:

aShiftKeyIsDown = IsShiftKeyDown();

being the same as:

aShiftKeyIsDown = (IsRightShiftKeyDown() or IsLeftShiftKeyDown());

Related Events

See Also

Notes

  • The modifier keys are not considered to be down if the current call stack started with a binding-triggered event dispatch where the modifier key was part of the binding.