Refactor KeyShortcutModifiers to fix control key behavior and improve consistency

This commit is contained in:
mauro-balades 2024-09-30 00:41:14 +02:00
parent 89b572e8fe
commit e26ea1f4f0

View file

@ -187,12 +187,15 @@ class KeyShortcutModifiers {
if (!other) { if (!other) {
return false; return false;
} }
// If we are on macos, we can have accel and meta at the same time
return ( return (
this.#alt == other.#alt && this.#alt == other.#alt &&
this.#shift == other.#shift && this.#shift == other.#shift &&
this.#meta == other.#meta && this.#control == other.#control &&
this.#accel == other.#accel && (AppConstants.platform == 'macosx' ?
this.#control == other.#control (this.#meta || this.#accel) == (other.#meta || other.#accel) :
(this.#meta == other.#meta && this.#accel == other.#accel)
)
); );
} }