Skip to main content

Module keybindings

Module keybindings 

Source
Expand description

Keybindings and action catalog for interactive mode.

This module defines all available actions and their default key bindings, matching the legacy Pi Agent behavior from keybindings.md.

§Usage

use pi::keybindings::{AppAction, KeyBindings};

let bindings = KeyBindings::default();
let action = bindings.lookup(&key_event);

Structs§

KeyBinding
A key binding (key + modifiers).
KeyBindings
Complete keybindings configuration.
KeyBindingsLoadResult
Result of loading keybindings with diagnostics.
KeyModifiers
Key modifiers (ctrl, shift, alt).

Enums§

ActionCategory
Categories for organizing actions in /hotkeys display.
AppAction
All available actions that can be bound to keys.
KeyBindingParseError
Error type for key binding parsing.
KeyBindingsWarning
Warning types for keybindings loading.

Functions§

is_valid_key
Check if a key string is valid (for validation without full parsing).