Record Class KeyEvent
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.compat.KeyEvent
- All Implemented Interfaces:
InputWithModifiers
public record KeyEvent(int key, int scancode, int modifiers)
extends Record
implements InputWithModifiers
-
Constructor Summary
ConstructorsConstructorDescriptionKeyEvent(int key, int scancode, int modifiers) Creates an instance of aKeyEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanControl, or Command on macOS.final inthashCode()Returns a hash code value for this object.booleanisEscape()intkey()Returns the value of thekeyrecord component.intReturns the value of themodifiersrecord component.intscancode()Returns the value of thescancoderecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ixdarklord.folios.internal.compat.InputWithModifiers
hasAltDown, hasControlDown, hasShiftDown
-
Constructor Details
-
KeyEvent
public KeyEvent(int key, int scancode, int modifiers) Creates an instance of aKeyEventrecord class.- Parameters:
key- the value for thekeyrecord componentscancode- the value for thescancoderecord componentmodifiers- the value for themodifiersrecord component
-
-
Method Details
-
hasControlDownWithQuirk
public boolean hasControlDownWithQuirk()Control, or Command on macOS. -
isEscape
public boolean isEscape() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
key
public int key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
scancode
public int scancode()Returns the value of thescancoderecord component.- Returns:
- the value of the
scancoderecord component
-
modifiers
public int modifiers()Returns the value of themodifiersrecord component.- Specified by:
modifiersin interfaceInputWithModifiers- Returns:
- the value of the
modifiersrecord component
-