From 59d8bdec897b99b58fee3d3639144e4daa29ef94 Mon Sep 17 00:00:00 2001 From: "mr. M" Date: Sun, 13 Oct 2024 02:22:53 +0200 Subject: [PATCH] Refactor KeyShortcutModifiers to handle platform-specific key modifiers consistently --- src/ZenKeyboardShortcuts.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ZenKeyboardShortcuts.mjs b/src/ZenKeyboardShortcuts.mjs index 6421277..2e91737 100644 --- a/src/ZenKeyboardShortcuts.mjs +++ b/src/ZenKeyboardShortcuts.mjs @@ -198,8 +198,9 @@ class KeyShortcutModifiers { this.#shift == other.#shift && this.#control == other.#control && (AppConstants.platform == 'macosx' - ? (this.#meta || this.#accel) == (other.#meta || other.#accel) - : this.#meta == other.#meta && this.#accel == other.#accel) + ? ((this.#meta || this.#accel) == (other.#meta || other.#accel) && this.#control == other.#control) + // In other platforms, we can have control and accel counting as the same thing + : (this.#meta == other.#meta && (this.#control || this.#accel) == (other.#control || other.#accel))) ); }