struct
Opal::Terminal::KeyEvent
- Opal::Terminal::KeyEvent
- Struct
- Value
- Object
Overview
Represents a keyboard input event with modifier details.
Defined in:
opal/terminal/ansi_parser.crConstructors
Instance Method Summary
- #alt? : Bool
- #char : Char | Nil
- #ctrl? : Bool
-
#matches?(key_desc : String) : Bool
Convenience helper: returns whether this event matches a string key description like "ctrl+c", "enter", "q", "up", "esc".
- #name : String
- #shift? : Bool
-
#to_s(io : IO) : Nil
Same as
#inspect(io).
Constructor Detail
def self.new(name : String, char : Char | Nil = nil, ctrl : Bool = false, alt : Bool = false, shift : Bool = false)
#
Instance Method Detail
def matches?(key_desc : String) : Bool
#
Convenience helper: returns whether this event matches a string key description like "ctrl+c", "enter", "q", "up", "esc".