aboutsummaryrefslogtreecommitdiff
path: root/src/app/input.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-28 04:29:37 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-28 04:29:37 +0300
commitf18f26d1c0fd8101baee946f71bdd77b9743df41 (patch)
tree0fd096fe8c6acd069209ec8ff340a0d0f0921966 /src/app/input.rs
parent6a4315c4ee563b515c2b775df8d78d242d680ced (diff)
fix prefix key defaults and binding parsing
Diffstat (limited to 'src/app/input.rs')
-rw-r--r--src/app/input.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app/input.rs b/src/app/input.rs
index c91722f7..254b7916 100644
--- a/src/app/input.rs
+++ b/src/app/input.rs
@@ -8,7 +8,7 @@ use tracing::warn;
use crate::layout::{NavDirection, PaneInfo, SplitBorder};
use crate::selection::Selection;
-use super::state::{AppState, ContextMenuState, DragState, Mode, CONTEXT_MENU_ITEMS};
+use super::state::{key_matches, AppState, ContextMenuState, DragState, Mode, CONTEXT_MENU_ITEMS};
use super::App;
// ---------------------------------------------------------------------------
@@ -86,19 +86,19 @@ fn handle_navigate_key(state: &mut AppState, key: KeyEvent) {
// Configurable keybinds (checked before fixed binds)
let kb = &state.keybinds;
- if key.code == kb.split_vertical.0 && key.modifiers.contains(kb.split_vertical.1) {
+ if key_matches(&key, kb.split_vertical.0, kb.split_vertical.1) {
state.split_pane(Direction::Horizontal);
return;
}
- if key.code == kb.split_horizontal.0 && key.modifiers.contains(kb.split_horizontal.1) {
+ if key_matches(&key, kb.split_horizontal.0, kb.split_horizontal.1) {
state.split_pane(Direction::Vertical);
return;
}
- if key.code == kb.close_pane.0 && key.modifiers.contains(kb.close_pane.1) {
+ if key_matches(&key, kb.close_pane.0, kb.close_pane.1) {
state.close_pane();
return;
}
- if key.code == kb.fullscreen.0 && key.modifiers.contains(kb.fullscreen.1) {
+ if key_matches(&key, kb.fullscreen.0, kb.fullscreen.1) {
state.toggle_fullscreen();
return;
}