Skip to content

Commit

Permalink
add hotkey to toggle zen-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Oct 26, 2024
1 parent e3268c4 commit 15f4344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/app/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 15f4344

Please sign in to comment.