notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 698c07b57a7d66aef15e9b52b80ee48506f22fa0
parent a4c6cfd445511c747433914ad6df034cfbea94fd
Author: Martti Malmi <sirius@iki.fi>
Date:   Thu, 20 Nov 2025 04:09:25 +0200

back fwd nav with ctrl/cmd + arrows

Diffstat:
Mcrates/notedeck_columns/src/app.rs | 60+++++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 19 deletions(-)

diff --git a/crates/notedeck_columns/src/app.rs b/crates/notedeck_columns/src/app.rs @@ -74,27 +74,49 @@ fn handle_egui_events( ) { for event in &input.raw.events { match event { - egui::Event::Key { key, pressed, .. } if *pressed => match key { - egui::Key::J => { - //columns.select_down(); - {} - } - /* - egui::Key::K => { - columns.select_up(); - } - egui::Key::H => { - columns.select_left(); - } - egui::Key::L => { - columns.select_left(); + egui::Event::Key { + key, + pressed, + modifiers, + .. + } if *pressed => { + // Browser-like navigation: Cmd+Arrow (macOS) / Ctrl+Arrow (others) + if (modifiers.ctrl || modifiers.command) && !modifiers.shift && !modifiers.alt { + match key { + egui::Key::ArrowLeft => { + columns.get_selected_router().go_back(); + continue; + } + egui::Key::ArrowRight => { + columns.get_selected_router().go_forward(); + continue; + } + _ => {} + } } - */ - egui::Key::BrowserBack | egui::Key::Escape => { - columns.get_selected_router().go_back(); + + match key { + egui::Key::J => { + //columns.select_down(); + {} + } + /* + egui::Key::K => { + columns.select_up(); + } + egui::Key::H => { + columns.select_left(); + } + egui::Key::L => { + columns.select_left(); + } + */ + egui::Key::BrowserBack | egui::Key::Escape => { + columns.get_selected_router().go_back(); + } + _ => {} } - _ => {} - }, + } egui::Event::PointerButton { button: egui::PointerButton::Extra1,