CPKeyboardEvent

final case class CPKeyboardEvent(key: CPKeyboardKey, sameAsLast: Boolean, eventFrame: Long, eventNs: Long, lastEventFrame: Long, lastEventNs: 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.

eventNs

Timestamp of the event in nanoseconds.

key

Keyboard key.

lastEventFrame

Frame number of the last keyboard event.

lastEventNs

Timestamp in nanoseconds of the last keyboard event.

sameAsLast

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

See also:
Source:
CPKeyboardEvent.scala
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

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
Source:
CPKeyboardEvent.scala

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product