From 53225c02b47d55bffddc6ff64e2d46776288d0c4 Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Mon, 24 Feb 2025 08:05:50 +0100 Subject: [PATCH] feat(keyboard_actions): add shortcut for creating new split --- src/public/app/components/entrypoints.ts | 4 ++++ src/services/keyboard_actions.ts | 7 ++++++- src/services/keyboard_actions_interface.ts | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/public/app/components/entrypoints.ts b/src/public/app/components/entrypoints.ts index 69651de17..d49c7dc45 100644 --- a/src/public/app/components/entrypoints.ts +++ b/src/public/app/components/entrypoints.ts @@ -213,6 +213,10 @@ export default class Entrypoints extends Component { this.hideAllPopups(); } + createNewSplitCommand() { + appContext.triggerCommand("openNewNoteSplit"); + } + async forceSaveRevisionCommand() { const noteId = appContext.tabManager.getActiveContextNoteId(); diff --git a/src/services/keyboard_actions.ts b/src/services/keyboard_actions.ts index 1df14a264..c2ce0ec8c 100644 --- a/src/services/keyboard_actions.ts +++ b/src/services/keyboard_actions.ts @@ -304,7 +304,12 @@ function getDefaultKeyboardActions() { description: t("keyboard_actions.last-tab"), scope: "window" }, - + { + actionName: "createNewSplit", + defaultShortcuts: [], + description: t("keyboard_actions.create-new-split"), + scope: "window" + }, { separator: t("keyboard_actions.dialogs") }, diff --git a/src/services/keyboard_actions_interface.ts b/src/services/keyboard_actions_interface.ts index 2fc96665f..59ae706f8 100644 --- a/src/services/keyboard_actions_interface.ts +++ b/src/services/keyboard_actions_interface.ts @@ -46,6 +46,7 @@ const enum KeyboardActionNamesEnum { eigthTab, ninthTab, lastTab, + createNewSplit, showNoteSource, showOptions, showRevisions,