Skip to main content

Module key_hint

Module key_hint 

Source
Expand description

Key binding primitives and input matching for the TUI.

This module provides KeyBinding, the runtime representation of a single keybinding (key code + modifier set), along with matching logic that handles cross-terminal inconsistencies in how shifted letters and raw C0 control characters are reported.

List and picker code should match navigation through these helpers instead of comparing KeyEvent values directly. The matcher owns compatibility for terminals that report control chords as C0 characters, while is_plain_text_key_event gives searchable pickers a shared boundary between text input and navigation commands.

It also supplies rendering helpers that convert bindings into styled ratatui::text::Span values for UI hint display.

Structs§

KeyBinding
One concrete key event that can trigger a TUI action.

Traits§

KeyBindingListExt
Matching helpers for one action’s keybinding set.

Functions§

alt
ctrl
ctrl_alt
has_ctrl_or_alt
is_altgr
is_plain_text_key_event
Returns whether an event should be treated as literal text input.
normalize_key_parts
plain
shift