ratatui_toolkit/vt100_term/keybindings/mod.rs
1//! Configurable keybindings for VT100Term
2
3mod constructors;
4mod methods;
5
6use crate::vt100_term::key_binding::KeyBinding;
7use crossterm::event::KeyCode;
8
9/// Configurable keybindings for VT100Term
10#[derive(Debug, Clone)]
11pub struct VT100TermKeyBindings {
12 /// Key to enter copy mode (default: Ctrl+B)
13 pub enter_copy_mode: KeyBinding,
14 /// Key to copy selection (default: Ctrl+Shift+C)
15 pub copy_selection: KeyBinding,
16
17 // Copy mode keys
18 /// Exit copy mode (default: Esc, q)
19 pub copy_exit: Vec<KeyCode>,
20 /// Move cursor up in copy mode (default: k, Up)
21 pub copy_move_up: Vec<KeyCode>,
22 /// Move cursor down in copy mode (default: j, Down)
23 pub copy_move_down: Vec<KeyCode>,
24 /// Move cursor left in copy mode (default: h, Left)
25 pub copy_move_left: Vec<KeyCode>,
26 /// Move cursor right in copy mode (default: l, Right)
27 pub copy_move_right: Vec<KeyCode>,
28 /// Set selection anchor in copy mode (default: Space, Enter)
29 pub copy_set_selection: Vec<KeyCode>,
30 /// Copy selection and exit copy mode (default: c, y)
31 pub copy_and_exit: Vec<KeyCode>,
32}