Click or drag to resize

EventCheckerIsModifierCombinationPressed Method

Note: This API is now obsolete.

Verifies that the requested key modifiers are pressed.

Namespace:  KSPDev.InputUtils
Assembly:  KSPDev_Utils.2.2 (in KSPDev_Utils.2.2.dll) Version: 2.2 for KSP v1
Syntax
C#
[ObsoleteAttribute("This method will soon be depreacted. Use CheckAnySymmetricalModifiers().")]
public static bool IsModifierCombinationPressed(
	KeyModifiers modifiers
)
Request Example View Source

Parameters

modifiers
Type: KSPDev.InputUtilsKeyModifiers
A combination of key modifiers to verify.

Return Value

Type: Boolean
true when exactly the requested combination is pressed.
Remarks
The check will succeed only if the exact set of modifier keys is pressed. If there are more or less modifiers pressed the check will fail. E.g. if there are LeftAlt and LeftShift pressed but the check is executed against AnyShift then it will fail. Though, checking for AnyShift | AnyAlt will succeed.

In case of checking for None the check will require no modifier keys to be pressed. If you deal with mouse button events it's a good idea to verify if no modifiers are pressed even if you don't care about other combinations. It will let other modders to use mouse buttons and not to interfere with your mod.

See Also