module
Obsctl::TUI::Input
Extended Modules
Defined in:
obsctl/tui/input.crConstant Summary
-
SIMPLE_KEYS =
{'r' => ActionKind::ReloadConfig, 'D' => ActionKind::DumpConfig, 'R' => ActionKind::RetryConnect, 's' => ActionKind::FocusScenes, 'a' => ActionKind::FocusAudio, 'p' => ActionKind::FocusProfiles, 'c' => ActionKind::FocusCollections} -
Plain characters that map straight to an action.
Checked before the control-modified bindings below, matching the original ordering:
rreloads whether or not control is held, whilecreaches FocusCollections only because control+c is claimed by Quit earlier inglobal_key.
Instance Method Summary
-
#handle_key(model : Model, key : CryTUI::KeyEvent) : Action | Nil
Resolves a key press to an action, or nil when nothing is bound.
-
#handle_mouse(model : Model, event : CryTUI::MouseEvent, area : CryTUI::Rect) : Action | Nil
Resolves a mouse report to an action, or nil when the pointer is not over anything actionable.
Instance Method Detail
Resolves a key press to an action, or nil when nothing is bound.
The palette and settings views capture every key, so they short-circuit.
A half-typed key sequence captures every key too -- that is what makes
<leader> and g behave like prefixes rather than like a keystroke
that also does something on its own. Otherwise the binding groups are
tried in priority order; each returns nil to pass the key along.
Resolves a mouse report to an action, or nil when the pointer is not over anything actionable.
Clicking a row focuses and selects it; clicking a row that is already selected activates it. That deliberate second click is why a stray click cannot cut the programme scene mid-broadcast, and it needs no double-click timer to do it.