public final class Modifiers extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isModifier(int keyCode)
Indicates whether the given key code is a modifier.
|
static int[] |
keysFor(int modifierMask)
Returns the key codes for the given modifier mask.
|
static int |
maskFor(int keyCode)
Returns the modifier mask for the given key code.
|
static int |
updateModifierWithKeyCode(int keyCode,
int modifierMask)
Updates the given modifier mask with the given key code, only if the given key code belongs to a modifier key.
|
@Nonnull public static int[] keysFor(int modifierMask)
modifierMask
- the given modifier mask.public static boolean isModifier(int keyCode)
keyCode
- the given key code.true
if the given key code is a modifier, false
otherwise.public static int maskFor(int keyCode)
keyCode
- the given key code.IllegalArgumentException
- if the given key code is not a modifier.public static int updateModifierWithKeyCode(int keyCode, int modifierMask)
keyCode
- the given key code.modifierMask
- the given modifier mask.Copyright © 2014–2019 AssertJ. All rights reserved.