MCPcopy Create free account
hub / github.com/HumbleUI/JWM / EventKey

Class EventKey

shared/java/EventKey.java:6–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import org.jetbrains.annotations.*;
5
6@Data
7public class EventKey implements Event {
8 @ApiStatus.Internal public final Key _key;
9 @ApiStatus.Internal public final boolean _isPressed;
10 @ApiStatus.Internal @Getter(AccessLevel.NONE) public final int _modifiers;
11 @ApiStatus.Internal public final KeyLocation _location;
12
13 @ApiStatus.Internal
14 public EventKey(int keyCode, boolean isPressed, int modifiers, int keyLocation) {
15 _key = Key.makeFromInt(keyCode);
16 _isPressed = isPressed;
17 _modifiers = modifiers;
18 _location = KeyLocation.makeFromInt(keyLocation);
19 }
20
21 public boolean isModifierDown(KeyModifier modifier) {
22 return (_modifiers & modifier._mask) != 0;
23 }
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected