From 3d5f6ba2a439796d0bf730eaf67c1aec9970a27f Mon Sep 17 00:00:00 2001 From: aliraza556 Date: Sun, 11 Aug 2024 23:00:52 +0500 Subject: [PATCH] fullscreen mode tweaks --- src/ui/fullscreen.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/fullscreen.ts b/src/ui/fullscreen.ts index 0c4eb27ec..86cfa1c13 100644 --- a/src/ui/fullscreen.ts +++ b/src/ui/fullscreen.ts @@ -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() {