mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 15:29:59 +02:00
Refactor KeyShortcutModifiers to fix control key behavior and improve consistency
This commit is contained in:
parent
89b572e8fe
commit
e26ea1f4f0
1 changed files with 6 additions and 3 deletions
|
@ -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)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue