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

Fix language/subtitle switcher when using gamepad

Raising the event code `13` (Enter) should be a lot more stable since `0`
is just the default and not assigned to any actual key [1]. This keycode
also has been standardized early enough to change it at this crucial part
of gamepad handling in my opinion.

[1] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

Fixes #3755
This commit is contained in:
cbe 2023-10-08 18:00:24 +02:00 committed by Bill Thornton
parent ae48e2a007
commit 386eaa0a69

View file

@ -38,7 +38,7 @@ const _GAMEPAD_LEFT_THUMBSTICK_UP_KEY = 'GamepadLeftThumbStickUp';
const _GAMEPAD_LEFT_THUMBSTICK_DOWN_KEY = 'GamepadLeftThumbStickDown';
const _GAMEPAD_LEFT_THUMBSTICK_LEFT_KEY = 'GamepadLeftThumbStickLeft';
const _GAMEPAD_LEFT_THUMBSTICK_RIGHT_KEY = 'GamepadLeftThumbStickRight';
const _GAMEPAD_A_KEYCODE = 0;
const _GAMEPAD_A_KEYCODE = 13;
const _GAMEPAD_B_KEYCODE = 27;
const _GAMEPAD_DPAD_UP_KEYCODE = 38;
const _GAMEPAD_DPAD_DOWN_KEYCODE = 40;