Record Class KeyInputEvent
java.lang.Object
java.lang.Record
com.botwithus.bot.api.event.KeyInputEvent
- Record Components:
key- the virtual key code (VK_*)alt- whether ALT was heldctrl- whether CTRL was heldshift- whether SHIFT was heldtimestamp- event creation time in milliseconds since epoch
- All Implemented Interfaces:
GameEvent
-
Constructor Summary
ConstructorsConstructorDescriptionKeyInputEvent(int key, boolean alt, boolean ctrl, boolean shift) KeyInputEvent(int key, boolean alt, boolean ctrl, boolean shift, long timestamp) Creates an instance of aKeyInputEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanalt()Returns the value of thealtrecord component.booleanctrl()Returns the value of thectrlrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intkey()Returns the value of thekeyrecord component.booleanshift()Returns the value of theshiftrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyInputEvent
public KeyInputEvent(int key, boolean alt, boolean ctrl, boolean shift) -
KeyInputEvent
public KeyInputEvent(int key, boolean alt, boolean ctrl, boolean shift, long timestamp) Creates an instance of aKeyInputEventrecord class.
-
-
Method Details
-
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
-
alt
-
ctrl
-
shift
-
timestamp
-