Prevent timer keyboard shortcuts from firing when modifier keys are pressed

This commit is contained in:
William Brawner 2023-09-13 22:08:46 -06:00
parent 12d5ca64b4
commit a5b40f710d

View file

@ -76,7 +76,7 @@ export class ActiveTimer extends LitElement {
constructor() { constructor() {
super(); super();
document.addEventListener('keyup', (event: KeyboardEvent) => { document.addEventListener('keyup', (event: KeyboardEvent) => {
if (event.target !== document.body) { if (event.target !== document.body || event.altKey || event.shiftKey || event.metaKey) {
return; return;
} }
switch (event.key) { switch (event.key) {