Removed debug printing.
- Attempted to fix Key Combo bug blocking 'S' key.
This commit is contained in:
@@ -64,7 +64,6 @@ class KeyComboListener {
|
||||
const keyCodes = this.#keyCodes;
|
||||
const combo = this.#combo;
|
||||
if (keyCodes.includes(code) && !combo.includes(code)) {
|
||||
console.log(`COMBO ADD: ${code}, COMBO:${combo}`);
|
||||
combo.push(code);
|
||||
}
|
||||
if (combo.length === 0 || keyCodes.length !== combo.length) {
|
||||
@@ -76,13 +75,12 @@ class KeyComboListener {
|
||||
}
|
||||
}
|
||||
if (document.activeElement !== this.element) {
|
||||
console.log("not active");
|
||||
return;
|
||||
}
|
||||
console.log("SAVE");
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.action();
|
||||
this.#combo.length = 0;
|
||||
});
|
||||
document.addEventListener("keyup", (e) => {
|
||||
// Mac keyup doesn't fire when meta key is held: https://stackoverflow.com/a/73419500
|
||||
|
||||
Reference in New Issue
Block a user