From 3e7707e883a2f5d812d55016d36f6e825133bad1 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 11 Dec 2025 15:37:28 +0100 Subject: [PATCH] Add arrow key support for folder navigation Add Left/Right arrow keys as alternatives to h/l for collapsing and expanding folders in the file panel. Provides more intuitive navigation for users not familiar with vim keybindings. - Left arrow: Collapse selected folder (same as 'h') - Right arrow: Expand selected folder (same as 'l') --- Cargo.toml | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22046cc..c6cf477 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-player" -version = "0.1.20" +version = "0.1.21" edition = "2021" [dependencies] diff --git a/src/main.rs b/src/main.rs index 89a9574..74fe2f6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -626,12 +626,12 @@ async fn handle_key_event(terminal: &mut Terminal< state.move_selection_down(); } } - (KeyCode::Char('h'), _) => { + (KeyCode::Char('h'), _) | (KeyCode::Left, _) => { if !state.focus_playlist { state.collapse_selected(); } } - (KeyCode::Char('l'), _) => { + (KeyCode::Char('l'), _) | (KeyCode::Right, _) => { if !state.focus_playlist { state.expand_selected(); }