Module: Ace::Tmux::Atoms::NamedKeyRegistry
- Defined in:
- lib/ace/tmux/atoms/named_key_registry.rb
Constant Summary collapse
- KEYS =
{ "enter" => "Enter", "tab" => "Tab", "space" => "Space", "escape" => "Escape", "esc" => "Escape", "up" => "Up", "down" => "Down", "left" => "Left", "right" => "Right", "c-c" => "C-c" }.freeze
Class Method Summary collapse
Class Method Details
.normalize(key) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/ace/tmux/atoms/named_key_registry.rb', line 22 def normalize(key) value = key.to_s.strip raise Ace::Tmux::ValidationError, "Named key is required" if value.empty? normalized = KEYS[value.downcase] raise Ace::Tmux::ValidationError, "Unsupported named key: #{key}" unless normalized normalized end |