Refactor KeyShortcutModifiers to handle platform-specific key modifiers consistently

This commit is contained in:
mr. M 2024-10-13 02:22:53 +02:00
parent 382466fcd7
commit 59d8bdec89
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -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)))
);
}