Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

feat(shortcuts): support Lightroom Classic F6 and F7 panel toggles

Nigel Ihza Firdausyba4533398665
diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs
index 129fb1d9e..8150cf019 100644
--- a/crates/ui-egui/src/shortcuts.rs
+++ b/crates/ui-egui/src/shortcuts.rs
@@ -198,6 +198,10 @@ pub const ALIASES: &[(&str, &str, &str)] = &[
("Shift+E", "dialog.export", "{}"),
("Cmd+E", "app.exportPrevious", "{}"),
("Space", "view.zoomToggle", "{}"),
+ // Lightroom Classic: F6 toggles the filmstrip, F7 the left library panel.
+ // Keep existing primary shortcuts and honour custom keymap assignments.
+ ("F6", "view.filmstrip", "{}"),
+ ("F7", "view.leftPanel", "{}"),
("Shift+M", "version.create", "{}"),
("Shift+X", "photo.flag", r#"{"flag": "reject", "advance": true}"#),
("Shift+Z", "photo.flag", r#"{"flag": "pick", "advance": true}"#),
@@ -620,6 +624,20 @@ mod tests {
}
}
+ #[test]
+ fn classic_f6_and_f7_toggle_the_filmstrip_and_left_panel() {
+ let mut h = library();
+ let (filmstrip, left) = (h.app.ui.filmstrip, h.app.ui.left_panel);
+ key(&mut h, "F6", false);
+ assert_eq!(h.app.ui.filmstrip, !filmstrip);
+ assert_eq!(h.app.ui.left_panel, left);
+ key(&mut h, "F7", false);
+ assert_eq!(h.app.ui.left_panel, !left);
+ key(&mut h, "F6", false);
+ key(&mut h, "F7", false);
+ assert_eq!((h.app.ui.filmstrip, h.app.ui.left_panel), (filmstrip, left));
+ }
+
#[test]
fn shift_culling_keys_advance_exactly_once() {
use lightcraft_catalog::{ColorLabel, Flag, PhotoId};