class Obsctl::TUI::Input::Controller

Overview

Converts raw key input into command palette edits or dashboard actions.

Defined in:

obsctl/tui/input/controller.cr

Constant Summary

BACKSPACE = "\u007F"
CTRL_C = "\u0003"
CTRL_H = "\b"
ENTER = "\r"
ESCAPE = "\e"
NEWLINE = "\n"

Constructors

Instance Method Summary

Constructor Detail

def self.new(keymap : Keymap, palette_prefix : String = "/") #

[View source]

Instance Method Detail

def command_line : String #

Returns the current command palette line, or an empty string when closed.


[View source]
def command_mode : Obsctl::TUI::Input::CommandMode #

[View source]
def handle(key : String) : Action #

Handles one key and returns the resulting UI action.


[View source]