mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Change behavior of arrow keys and Enter when OSD is hidden
(cherry picked from commit 76c55116ce
)
This commit is contained in:
parent
0381af80f1
commit
8c8e240792
1 changed files with 15 additions and 0 deletions
|
@ -1195,6 +1195,21 @@ export default function (view) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (layoutManager.tv && !currentVisibleMenu) {
|
||||
// Change the behavior of some keys when the OSD is hidden
|
||||
switch (key) {
|
||||
case 'ArrowLeft':
|
||||
case 'ArrowRight':
|
||||
showOsd(nowPlayingPositionSlider);
|
||||
nowPlayingPositionSlider.dispatchEvent(new KeyboardEvent(e.type, e));
|
||||
return;
|
||||
case 'Enter':
|
||||
playbackManager.playPause(currentPlayer);
|
||||
showOsd(btnPlayPause);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (layoutManager.tv && keyboardnavigation.isNavigationKey(key)) {
|
||||
showOsd();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue