From 15f434400d2cf9bc727d441495cf535b8de6fe4c Mon Sep 17 00:00:00 2001 From: Axel Kappel <69117984+Kl4rry@users.noreply.github.com> Date: Sat, 26 Oct 2024 15:31:00 +0200 Subject: [PATCH] add hotkey to toggle zen-mode --- src/app.rs | 7 +++++++ src/app/help.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/src/app.rs b/src/app.rs index 53460cc..17c059d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -447,6 +447,13 @@ impl App { } } + if input.consume_shortcut(&KeyboardShortcut { + modifiers: Modifiers::CTRL, + logical_key: I, + }) { + self.zen_mode = !self.zen_mode; + } + if input.consume_shortcut(&KeyboardShortcut { modifiers: Modifiers::CTRL, logical_key: H, diff --git a/src/app/help.rs b/src/app/help.rs index cb059d5..bfb0057 100644 --- a/src/app/help.rs +++ b/src/app/help.rs @@ -43,6 +43,7 @@ impl App { ("100% - 900% Zoom", "Ctrl + 1 - 9"), ("Previous image", "A or L or Left Arrow"), ("Next image", "D or H or Right Arrow"), + ("Toggle zen mode", "Ctrl + I"), ]; ui.label(RichText::new("Action").strong());