aboutsummaryrefslogtreecommitdiff
path: root/src/config/keybinds.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-28 23:12:50 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-28 23:12:50 +0300
commit7626a9adc84d6757042670f9816a583dcd717823 (patch)
tree56095c659834727ca73b03627a1f6eddc86ac666 /src/config/keybinds.rs
parent28222b20890a1f6cd36fd477de8e9bc6e5537ff5 (diff)
feat: add pane copy mode
refs #231
Diffstat (limited to 'src/config/keybinds.rs')
-rw-r--r--src/config/keybinds.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/keybinds.rs b/src/config/keybinds.rs
index ea7f411c..401154bc 100644
--- a/src/config/keybinds.rs
+++ b/src/config/keybinds.rs
@@ -282,6 +282,7 @@ pub struct Keybinds {
pub close_tab: ActionKeybinds,
pub rename_pane: ActionKeybinds,
pub edit_scrollback: ActionKeybinds,
+ pub copy_mode: ActionKeybinds,
pub focus_pane_left: ActionKeybinds,
pub focus_pane_down: ActionKeybinds,
pub focus_pane_up: ActionKeybinds,
@@ -460,6 +461,7 @@ impl Config {
close_tab: action!("keys.close_tab", &self.keys.close_tab),
rename_pane: action!("keys.rename_pane", &self.keys.rename_pane),
edit_scrollback: action!("keys.edit_scrollback", &self.keys.edit_scrollback),
+ copy_mode: action!("keys.copy_mode", &self.keys.copy_mode),
focus_pane_left: action!("keys.focus_pane_left", &self.keys.focus_pane_left),
focus_pane_down: action!("keys.focus_pane_down", &self.keys.focus_pane_down),
focus_pane_up: action!("keys.focus_pane_up", &self.keys.focus_pane_up),
@@ -1267,6 +1269,18 @@ next_tab = "prefix+n"
}
#[test]
+ fn copy_mode_uses_tmux_prefix_bracket_by_default() {
+ let kb = Config::default().keybinds();
+ assert_eq!(
+ binding_triggers(&kb.copy_mode),
+ vec![BindingTrigger::Prefix((
+ KeyCode::Char('['),
+ KeyModifiers::empty()
+ ))]
+ );
+ }
+
+ #[test]
fn back_and_forth_keybinds_are_unset_by_default() {
let kb = Config::default().keybinds();
assert!(kb.last_pane.bindings.is_empty());