1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Support for Home and Search media keys in TV mode

The remote I have has some extra "media" buttons besides the already
supported playback controls.

This adds support for "Find" button to navigate to search page and
"BrowserHome" button to navigate back to main screen.

Adding these to the `NavigationKeys` only enables functionality for TV
mode which I think is pretty reasonable constraint - on actual desktop
people might prefer to use these keys to control the browser rather than
Jellyfin interface.
This commit is contained in:
Miroslav Prasil 2024-08-25 10:46:43 +00:00
parent 14fd036f93
commit fd18c3e600

View file

@ -43,7 +43,7 @@ const KeyNames = {
/** /**
* Keys used for keyboard navigation. * Keys used for keyboard navigation.
*/ */
const NavigationKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']; const NavigationKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'BrowserHome', 'Find'];
/** /**
* Keys used for media playback control. * Keys used for media playback control.
@ -182,6 +182,13 @@ export function enable() {
} }
break; break;
case 'Find':
inputManager.handleCommand('search');
break;
case 'BrowserHome':
inputManager.handleCommand('home');
break;
case 'MediaPlay': case 'MediaPlay':
inputManager.handleCommand('play'); inputManager.handleCommand('play');
break; break;