Use keyboard key names for navigation on controller.

This commit is contained in:
Bradley Eaton
2025-06-30 16:07:37 +01:00
parent a7d443ab23
commit eff4ca2f19
5 changed files with 20 additions and 56 deletions
-6
View File
@@ -138,18 +138,12 @@ export class BookPlayer {
if (!this.loaded) return;
switch (key) {
case 'NavigationRight':
case 'GamepadDPadRight':
case 'GamepadLeftThumbRight':
case 'l':
case 'ArrowRight':
case 'Right':
e.preventDefault();
this.next();
break;
case 'NavigationLeft':
case 'GamepadDPadLeft':
case 'GamepadLeftThumbLeft':
case 'j':
case 'ArrowLeft':
case 'Left':