Skip to content

Build your personal knowledge base with Trilium Notes

feat(zen): add keyboard shortcut

Elian Doranbe39668488b5
diff --git a/src/services/keyboard_actions.ts b/src/services/keyboard_actions.ts
index 21745878db..1df14a2649 100644
--- a/src/services/keyboard_actions.ts
+++ b/src/services/keyboard_actions.ts
@@ -238,6 +238,12 @@ function getDefaultKeyboardActions() {
description: t("keyboard_actions.toggle-tray"),
scope: "window"
},
+ {
+ actionName: "toggleZenMode",
+ defaultShortcuts: ["Alt+Z"],
+ description: t("keyboard_actions.toggle-zen-mode"),
+ scope: "window"
+ },
{
actionName: "firstTab",
defaultShortcuts: ["CommandOrControl+1"],
diff --git a/src/services/keyboard_actions_interface.ts b/src/services/keyboard_actions_interface.ts
index 9eb3539bd5..2fc96665f6 100644
--- a/src/services/keyboard_actions_interface.ts
+++ b/src/services/keyboard_actions_interface.ts
@@ -35,6 +35,7 @@ const enum KeyboardActionNamesEnum {
activatePreviousTab,
openNewWindow,
toggleTray,
+ toggleZenMode,
firstTab,
secondTab,
thirdTab,
diff --git a/translations/en/server.json b/translations/en/server.json
index 0560c59762..49e08bb998 100644
--- a/translations/en/server.json
+++ b/translations/en/server.json
@@ -92,7 +92,8 @@
"toggle-book-properties": "Toggle Book Properties",
"toggle-classic-editor-toolbar": "Toggle the Formatting tab for the editor with fixed toolbar",
"export-as-pdf": "Exports the current note as a PDF",
- "show-cheatsheet": "Shows a modal with common keyboard operations"
+ "show-cheatsheet": "Shows a modal with common keyboard operations",
+ "toggle-zen-mode": "Enables/disables the zen mode (minimal UI for more focused editing)"
},
"login": {
"title": "Login",