docs: update keyboard-driven yomitan workflow

This commit is contained in:
2026-03-05 20:13:38 -08:00
parent 8ca05859a9
commit f9f2fe6e87
4 changed files with 9 additions and 8 deletions

View File

@@ -25,6 +25,7 @@
SubMiner is an Electron overlay that sits on top of mpv. It turns your video player into a full sentence-mining workstation:
- **Hover to look up** — Yomitan dictionary popups directly on subtitles
- **Keyboard-driven lookup mode** — Navigate token-by-token, keep lookup open across tokens, and control popup scrolling/audio/mining without leaving the overlay
- **One-key mining** — Creates Anki cards with sentence, audio, screenshot, and translation
- **Instant auto-enrichment** — Optional local AnkiConnect proxy enriches new Yomitan cards immediately
- **Reading annotations** — Combines N+1 targeting, frequency-dictionary highlighting, and JLPT underlining while you read

View File

@@ -5,7 +5,7 @@ status: Done
assignee:
- Codex
created_date: '2026-03-04 13:40'
updated_date: '2026-03-04 14:05'
updated_date: '2026-03-05 11:30'
labels:
- enhancement
- renderer
@@ -59,5 +59,5 @@ Add true keyboard-driven token lookup flow in overlay:
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Implemented keyboard-driven Yomitan workflow end-to-end in renderer + bundled Yomitan runtime bridge. Added overlay-level keyboard mode state, token selection sync, lookup toggle routing, popup command forwarding, and focus recovery after popup close. Added popup-visible detection improvements and CSS/test updates for keyboard-selected tooltip behavior. Updated user docs/README to document fixed keyboard workflow shortcuts.
Implemented keyboard-driven Yomitan workflow end-to-end in renderer + bundled Yomitan runtime bridge. Added overlay-level keyboard mode state, token selection sync, lookup toggle routing, popup command forwarding, and focus recovery after popup close. Follow-up fixes kept lookup open while moving between tokens, made popup-local `J/K` and `ArrowUp/ArrowDown` scroll work from overlay-owned focus with key repeat, skipped keyboard/token annotation flow for parser groups that have no dictionary-backed headword, and preserved paused playback when token navigation jumps across subtitle lines. Updated user docs/README to document the final shortcut behavior.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@@ -66,6 +66,8 @@ When a Yomitan popup is open, SubMiner also provides popup control shortcuts:
| ------------- | -------------------------------------- |
| `J` | Scroll definitions down |
| `K` | Scroll definitions up |
| `ArrowDown` | Scroll definitions down |
| `ArrowUp` | Scroll definitions up |
| `M` | Mine/add selected term |
| `P` | Play selected term audio |
| `[` | Play previous available audio (selected source) |
@@ -79,11 +81,9 @@ These shortcuts are fixed (not configurable) and require overlay focus.
| ------------------ | --------------------------------------------------------------------- |
| `Ctrl/Cmd+Shift+Y` | Toggle keyboard-driven token selection mode on/off |
| `Ctrl/Cmd+Y` | Toggle lookup popup for selected token (open when closed, close when open) |
| `ArrowLeft/Right`, `H`, or `L` | Move selected token (previous/next) |
| `ArrowUp` or `J` | Open lookup popup for selected token |
| `ArrowDown` | Close lookup popup |
| `ArrowLeft/Right`, `H`, or `L` | Move selected token (previous/next); if lookup is open, refresh definition for the new token |
Keyboard-driven mode draws a selection outline around the active token. While keyboard-driven mode is enabled, `J` opens lookup and `H` moves to the previous token. Other popup-local keys still work (`M`, `P`, `[`, `]`). Focus is forced back to the overlay after lookup open/close so token navigation can continue without clicking subtitle text again.
Keyboard-driven mode draws a selection outline around the active token. Use `Ctrl/Cmd+Y` to open or close lookup for that token. While the popup is open, popup-local controls still work from the overlay (`J/K`, `ArrowUp/ArrowDown`, `M`, `P`, `[`, `]`) and focus is forced back to the overlay so token navigation can continue without clicking subtitle text again. Moving left/right past the start or end of the line jumps to the previous or next subtitle line and keeps playback paused if it was already paused.
## Subtitle & Feature Shortcuts

View File

@@ -213,9 +213,9 @@ By default, hovering over subtitle text pauses mpv playback. Playback resumes as
If you want playback to stay paused while a Yomitan popup is open, set `subtitleStyle.autoPauseVideoOnYomitanPopup` to `true`. When enabled, SubMiner auto-resumes on popup close only if SubMiner paused playback for that popup.
Keyboard-driven lookup mode is available with fixed shortcuts: `Ctrl/Cmd+Shift+Y` toggles token-selection mode, `ArrowLeft/Right` (or `H/L`) moves the selected token, `ArrowUp/J` opens lookup for the selected token, `ArrowDown` closes lookup, and `Ctrl/Cmd+Y` toggles lookup for that token.
Keyboard-driven lookup mode is available with fixed shortcuts: `Ctrl/Cmd+Shift+Y` toggles token-selection mode, `ArrowLeft/Right` (or `H/L`) moves the selected token, and `Ctrl/Cmd+Y` opens or closes lookup for that token.
If the Yomitan popup is open, you can control it directly from the overlay: `J/K` scroll definitions, `M` mines/adds the selected term, `P` plays term audio, `[` plays the previous available audio, and `]` plays the next available audio in the selected source. In keyboard-driven lookup mode, `J` opens lookup, `H` moves to the previous token, `L` (or `ArrowRight`) moves to the next token, and `ArrowDown` closes lookup.
If the Yomitan popup is open, you can control it directly from the overlay without moving focus into the popup: `J/K` or `ArrowUp/ArrowDown` scroll definitions, `M` mines/adds the selected term, `P` plays term audio, `[` plays the previous available audio, and `]` plays the next available audio in the selected source. While lookup stays open, `ArrowLeft/Right` (or `H/L`) moves to the previous or next token and refreshes the definition for the new token. If you move past the start or end of the current subtitle line, SubMiner jumps to the previous or next subtitle line, moves the selector to the edge token on that line, and keeps playback paused if it was already paused.
### Drag-and-drop Queueing