mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 16:59:59 +02:00
Refactor ZenKeyboardShortcuts to fix case sensitivity issue in setNewBinding method
This commit is contained in:
parent
287f6fa80a
commit
15fbb2030f
1 changed files with 5 additions and 3 deletions
|
@ -469,9 +469,11 @@ class KeyShortcut {
|
||||||
}
|
}
|
||||||
|
|
||||||
setNewBinding(shortcut) {
|
setNewBinding(shortcut) {
|
||||||
for (let keycode of Object.entries(KEYCODE_MAP)) {
|
for (let keycode of Object.keys(KEYCODE_MAP)) {
|
||||||
if (KEYCODE_MAP[keycode] == shortcut.toUpperCase()) {
|
console.log(keycode);
|
||||||
this.#keycode = shortcut;
|
if (keycode == shortcut.toUpperCase()) {
|
||||||
|
console.log('Found keycode', shortcut);
|
||||||
|
this.#keycode = KEYCODE_MAP[keycode];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue