Controller: hold to show the secondary subtitle, dictionary entry navigation, standard button names (#312)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YashaNoosandClaude Opus 5.5 authored and GitHub committed 2026-11-01 15:54:47 -08:00
1 parent af44735bb8
commit 655510cf2e
24 files changed
+609 -33

No files matched your search

+13
View File
@@ -828,6 +828,18 @@ export function createKeyboardHandlers(
return true;
}
// Sends the same Alt+Up / Alt+Down a keyboard user would press, which Yomitan's
// default hotkeys map to its previousEntry / nextEntry actions. Moving the entry
// also changes which entry "mine selected" mines.
function movePopupEntryForController(direction: -1 | 1): boolean {
if (!isLookupPopupOpen(ctx.state, document)) {
return false;
}
const key = direction < 0 ? 'ArrowUp' : 'ArrowDown';
dispatchYomitanPopupKeydown(key, key, ['alt'], false);
return true;
}
function playCurrentAudioForController(): boolean {
if (!isLookupPopupOpen(ctx.state, document)) {
return false;
@@ -1396,6 +1408,7 @@ export function createKeyboardHandlers(
mineSelectedFromController,
cyclePopupAudioSourceForController,
playCurrentAudioForController,
movePopupEntryForController,
scrollPopupByController,
};
}