Module: Terminal::DumbKeys
- Defined in:
- lib/terminal/input/dumb_keys.rb
Constant Summary collapse
- ORD =
{ 0x05 => 'Ctrl+c', 0x08 => 'Back', 0x09 => 'Tab', 0x0a => 'Enter', 0x0d => 'Return', 0x1b => 'Esc' }.compare_by_identity.freeze
Class Method Summary collapse
Class Method Details
.[](key) ⇒ Object
5 6 7 |
# File 'lib/terminal/input/dumb_keys.rb', line 5 def self.[](key) ORD[key.ord] if key.size == 1 end |