class

Opal::Input::KeyMap

Inherits Reference < Object

Declarative key binding and shortcut dispatch DSL.

Instance methods

handle(event : Terminal::KeyEvent) : Bool

Dispatches a KeyEvent through the registered key bindings. Returns true if a binding matched and was executed, false otherwise.

Source
on(*keys : String, &block : -> Nil) : self

Convenience overload when block takes 0 parameters

Source
on_any

Registers a catch-all handler for any unhandled key

Source
on_char

Registers a handler for any printable character input

Source

Nested types