Espresso::KeyboardKeyEvent
Inherits Espresso::KeyboardEvent / Espresso::WindowEvent / Struct / Value / Object
Event triggered when a physical keyboard key is pressed or released.
Instance methods
key_name?
Retrieves the name of the key, encoded as UTF-8. If the key is printable, a string will be returned, nil otherwise.
scancode
The scancode of a key is specific to that platform
or sometimes even to that machine.
Scancodes are intended to allow users to bind keys
that don't have a GLFW Key token.
Such keys have #key set to Key::Unknown,
their state is not saved
and so it cannot be queried with Keyboard#key.
Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.