Skip to content

Commit

Permalink
Don't use meta or windows buttons in shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
yownas committed Dec 8, 2023
1 parent 65d116f commit 9d93811
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@
document.addEventListener('keydown', (e) => {
let handle = 'none';
if (e.key !== undefined) {
if ((e.key === 'Enter' && (e.metaKey || e.ctrlKey || e.altKey))) handle = 'run';
if ((e.key === 'Enter' && e.ctrlKey)) handle = 'run';
} else if (e.keyCode !== undefined) {
if ((e.keyCode === 13 && (e.metaKey || e.ctrlKey || e.altKey))) handle = 'run';
if ((e.keyCode === 13 && e.ctrlKey)) handle = 'run';
}
if (e.key !== undefined) {
if ((e.key === 'Shift' && (e.metaKey || e.ctrlKey || e.altKey))) handle = 'hurtme';
if ((e.key === 'Shift' && e.ctrlKey)) handle = 'hurtme';
} else if (e.keyCode !== undefined) {
if ((e.keyCode === 16 && (e.metaKey || e.ctrlKey || e.altKey))) handle = 'hurtme';
if ((e.keyCode === 16 && e.ctrlKey)) handle = 'hurtme';
}
if (handle == 'run') {
const button = document.getElementById('generate');
Expand Down

0 comments on commit 9d93811

Please sign in to comment.