From 87229600d2f981dc5737f4239273fb7d12d5e74c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 10 Mar 2026 20:15:10 +0200 Subject: [PATCH] feat(video_player): keyboard shortcut to toggle full-screen --- apps/client/src/widgets/type_widgets/file/Video.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/client/src/widgets/type_widgets/file/Video.tsx b/apps/client/src/widgets/type_widgets/file/Video.tsx index a74e874dc6..6972f57484 100644 --- a/apps/client/src/widgets/type_widgets/file/Video.tsx +++ b/apps/client/src/widgets/type_widgets/file/Video.tsx @@ -58,6 +58,15 @@ export default function VideoPreview({ note }: { note: FNote }) { video.currentTime = Math.min(video.duration, video.currentTime + (e.ctrlKey ? 60 : 10)); flashControls(); break; + case "f": + case "F": + e.preventDefault(); + if (document.fullscreenElement) { + document.exitFullscreen(); + } else { + wrapperRef.current?.requestFullscreen(); + } + break; } }, [togglePlayback, flashControls]);