Record Class GuiKeyEvent
java.lang.Object
java.lang.Record
dev.boze.api.gui.input.GuiKeyEvent
- Record Components:
key- GLFW key codescancode- Platform scancodemodifiers- GLFW modifier bits
A key press or release.
-
Constructor Summary
ConstructorsConstructorDescriptionGuiKeyEvent(int key, int scancode, int modifiers) Creates an instance of aGuiKeyEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanbooleanhasAlt()booleanfinal inthashCode()Returns a hash code value for this object.booleanhasShift()booleanbooleanisCopy()booleanisDelete()booleanisEnter()booleanisEscape()booleanisPaste()booleanbooleanisTab()intkey()Returns the value of thekeyrecord component.keyName()intReturns the value of themodifiersrecord component.intscancode()Returns the value of thescancoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GuiKeyEvent
-
-
Method Details
-
isEscape
public boolean isEscape() -
isEnter
public boolean isEnter() -
isBackspace
public boolean isBackspace() -
isDelete
public boolean isDelete() -
isTab
public boolean isTab() -
hasShift
public boolean hasShift() -
hasControl
public boolean hasControl() -
hasAlt
public boolean hasAlt() -
hasActionModifier
public boolean hasActionModifier()- Returns:
- Whether Cmd (macOS) or Ctrl (elsewhere) is held
-
isPaste
public boolean isPaste() -
isCopy
public boolean isCopy() -
isSelectAll
public boolean isSelectAll() -
keyName
- Returns:
- The printable name of the key in the current keyboard layout, or null
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
key
-
scancode
-
modifiers
-