feat: toggle fullscreen with F key with shell

This commit is contained in:
Tim 2025-05-27 10:28:02 +02:00
parent 19bf6abb00
commit 2b44367a26
2 changed files with 4 additions and 10 deletions

View file

@ -46,6 +46,10 @@ const useFullscreen = () => {
exitFullscreen();
}
if (event.code === 'KeyF') {
toggleFullscreen();
}
if (event.code === 'F11' && shell.active) {
toggleFullscreen();
}

View file

@ -56,16 +56,6 @@ function KeyboardShortcuts() {
window.history.back();
}
break;
}
case 'KeyF': {
event.preventDefault();
if (document.fullscreenElement === document.documentElement) {
document.exitFullscreen();
} else {
document.documentElement.requestFullscreen();
}
break;
}
}