struct Opal::Terminal::KeyEvent

Overview

Represents a keyboard input event with modifier details.

Defined in:

opal/terminal/ansi_parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, char : Char | Nil = nil, ctrl : Bool = false, alt : Bool = false, shift : Bool = false) #

[View source]

Instance Method Detail

def alt? : Bool #

[View source]
def char : Char | Nil #

[View source]
def ctrl? : Bool #

[View source]
def matches?(key_desc : String) : Bool #

Convenience helper: returns whether this event matches a string key description like "ctrl+c", "enter", "q", "up", "esc".


[View source]
def name : String #

[View source]
def shift? : Bool #

[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]