KeyboardInput

eu.joaocosta.minart.input.KeyboardInput
See theKeyboardInput companion object
final case class KeyboardInput(keysDown: Set[Key], events: Queue[Event])

The keyboard input stores the state of the keyboard at a certain point in time. It also accumulates keys that have been pressed and released.

Value parameters

events

ordered press/release keyboard events. Note that only the most recent KeyboardInput.maxEvents are guaranteed to be present.

keysDown

keys that are pressed down

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Clears the keysPressed and keysReleased.

Clears the keysPressed and keysReleased.

Attributes

def isDown(key: Key): Boolean

Checks if a key is down.

Checks if a key is down.

Attributes

def isUp(key: Key): Boolean

Checks if a key is up.

Checks if a key is up.

Attributes

def press(key: Key): KeyboardInput

Returns a new state where a key has been pressed.

Returns a new state where a key has been pressed.

Attributes

Returns a new state where a key has been released.

Returns a new state where a key has been released.

Attributes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

lazy val keysPressed: Set[Key]

Keys that have been pressed

Keys that have been pressed

Attributes

lazy val keysReleased: Set[Key]

Keys that have been released

Keys that have been released

Attributes