CPKeyboardEvent

org.cosplay.CPKeyboardEvent
final case class CPKeyboardEvent(key: CPKeyboardKey, sameAsLast: Boolean, eventFrame: Long, eventMs: Long, lastEventFrame: Long, lastEventMs: Long)

Container for the keyboard input event.

Your scene objects can access the current keyboard event using CPSceneObjectContext.getKbEvent method.

Value parameters

eventFrame

Frame number for this event.

eventMs

Timestamp of the event in milliseconds.

key

Keyboard key.

lastEventFrame

Frame number of the last keyboard event.

lastEventMs

Timestamp in milliseconds of the last keyboard event.

sameAsLast

Whether or not last keyboard event had the same keyboard key.

Attributes

See also
Source
CPKeyboardEvent.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isRepeated: Boolean

Whether or not this is a repeated press on keyboard of the same key.

Whether or not this is a repeated press on keyboard of the same key.

It is defined as:

sameAsLast && eventFrame - lastEventFrame == 1

Attributes

Source
CPKeyboardEvent.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product