Controller: character navigation in keyboard-only mode, plain Xbox face names (#326)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
YashaNoosandClaude Opus 5.5 authored and GitHub committed 2026-11-04 21:54:00 -08:00
1 parent a8bc585f75
commit 14ef7e823c
25 files changed
+569 -29

No files matched your search

@@ -57,6 +57,8 @@ type GamepadControllerOptions = {
playCurrentAudio: () => void;
previousEntry: () => void;
nextEntry: () => void;
/** Switches keyboard-only mode between moving by word and by character. */
toggleCharacterNavigation: () => void;
toggleMpvPause: () => void;
previousSubtitle: () => void;
nextSubtitle: () => void;
@@ -419,6 +421,7 @@ export function createGamepadController(options: GamepadControllerOptions) {
['playCurrentAudio', config.bindings.playCurrentAudio],
['previousEntry', config.bindings.previousEntry],
['nextEntry', config.bindings.nextEntry],
['toggleCharacterNavigation', config.bindings.toggleCharacterNavigation],
...WATCHING_ACTIONS.map((actionKey) => [actionKey, config.bindings[actionKey]] as const),
] as const;
@@ -580,6 +583,13 @@ export function createGamepadController(options: GamepadControllerOptions) {
activeConfig,
options.quitMpv,
);
handleActionEdge(
'toggleCharacterNavigation',
activeConfig.bindings.toggleCharacterNavigation,
activeGamepad,
activeConfig,
options.toggleCharacterNavigation,
);
const activationThreshold = Math.max(activeConfig.stickDeadzone, 0.55);