Skip to content

Commit

Permalink
fullscreen mode tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
aliraza556 committed Aug 11, 2024
1 parent 42528ac commit 3d5f6ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ui/fullscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ export class Fullscreen {
if (isFullscreen) {
button.classList.add('fullscreenMode');
}

document.addEventListener('keydown', (event) => {
if (event.key === 'F11') {
event.preventDefault();
this.toggle();
} else if (event.shiftKey && event.key === 'F') {
this.toggle();
}
});
}

toggle() {
Expand Down

0 comments on commit 3d5f6ba

Please sign in to comment.