mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 14:59:59 +02:00
Refactor KeyShortcutModifiers to handle platform-specific key modifiers consistently
This commit is contained in:
parent
382466fcd7
commit
59d8bdec89
1 changed files with 3 additions and 2 deletions
|
@ -198,8 +198,9 @@ class KeyShortcutModifiers {
|
||||||
this.#shift == other.#shift &&
|
this.#shift == other.#shift &&
|
||||||
this.#control == other.#control &&
|
this.#control == other.#control &&
|
||||||
(AppConstants.platform == 'macosx'
|
(AppConstants.platform == 'macosx'
|
||||||
? (this.#meta || this.#accel) == (other.#meta || other.#accel)
|
? ((this.#meta || this.#accel) == (other.#meta || other.#accel) && this.#control == other.#control)
|
||||||
: this.#meta == other.#meta && this.#accel == other.#accel)
|
// 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)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue