From 89b572e8fe9a78d4301e213ab7e3b21e574463bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauro=20Balad=C3=A9s?= Date: Sun, 29 Sep 2024 22:26:54 +0300 Subject: [PATCH] Refactor KeyShortcutModifiers to fix control key behavior --- src/ZenKeyboardShortcuts.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index b4f456c..0d3d444 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -165,7 +165,7 @@ class KeyShortcutModifiers { toUserString() { let str = ''; - if (this.#control || this.#accel) { + if (this.#control && !this.#accel) { str += 'Ctrl+'; } if (this.#alt) { @@ -177,6 +177,9 @@ class KeyShortcutModifiers { if (this.#meta) { str += AppConstants.platform == 'macosx' ? 'Cmd+' : 'Win+'; } + if (this.#accel) { + str += AppConstants.platform == 'macosx' ? 'Cmd+' : 'Ctrl+'; + } return str; }