mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
Merge pull request #919 from Stremio/feat/shell-fullscreen-key-f
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
App(Shell): toggle fullscreen with F key
This commit is contained in:
commit
b3bd68eb32
2 changed files with 4 additions and 10 deletions
|
|
@ -46,6 +46,10 @@ const useFullscreen = () => {
|
|||
exitFullscreen();
|
||||
}
|
||||
|
||||
if (event.code === 'KeyF') {
|
||||
toggleFullscreen();
|
||||
}
|
||||
|
||||
if (event.code === 'F11' && shell.active) {
|
||||
toggleFullscreen();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue