mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-19 16:46:07 -08:00
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:
1 parent
af44735bb8
commit
655510cf2e
24 files changed
+609
-33
No files matched your search
@@ -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,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user