mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-10 04:46:07 -08:00
Controller: subtitle line actions, Button Style, keyboard-only mode pause, Alt+C fixes (#316)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
6d0f37ac21
commit
b99409bbcd
60 files changed
+1900
-219
No files matched your search
+38
-37
@@ -175,30 +175,31 @@ Controls how primary and secondary subtitles look and which annotations they sho
|
||||
}
|
||||
```
|
||||
|
||||
| Key | Default | What it does |
|
||||
| ------------------------------------------------ | ------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `subtitleStyle.primaryDefaultMode` | `"visible"` | Primary bar at startup: `hidden`, `visible`, or `hover` |
|
||||
| `subtitleStyle.css` | see example | CSS for primary subtitles (font, size `35px`, color, shadow, and so on) |
|
||||
| `subtitleStyle.secondary.css` | see example | CSS for secondary subtitles (size `24px`) |
|
||||
| `subtitleStyle.preserveLineBreaks` | `false` | Keep line breaks as mpv shows them instead of one line |
|
||||
| `subtitleStyle.autoPauseVideoOnHover` | `true` | Pause while the mouse is over subtitle text |
|
||||
| `subtitleStyle.autoPauseVideoOnYomitanPopup` | `true` | Pause while a Yomitan popup is open |
|
||||
| `subtitleStyle.primaryVisibleOnYomitanPopup` | `true` | In hover mode, keep the primary bar visible while a popup is open |
|
||||
| `subtitleStyle.knownWordColor` | `#a6da95` | Known-word highlight color |
|
||||
| `subtitleStyle.knownWordMaturityColors` | see example | `new`, `learning`, `young`, `mature` colors, used when `ankiConnect.knownWords.maturityEnabled` is on |
|
||||
| `subtitleStyle.nPlusOneColor` | `#c6a0f6` | N+1 target word color |
|
||||
| `subtitleStyle.enableJlpt` | `false` | Underline words by JLPT level |
|
||||
| `subtitleStyle.jlptColors` | see example | Underline colors for `N1` to `N5` |
|
||||
| `subtitleStyle.nameMatchEnabled` | `false` | Sync the character dictionary and color character names |
|
||||
| `subtitleStyle.nameMatchImagesEnabled` | `false` | Show small character portraits next to matched names |
|
||||
| `subtitleStyle.nameMatchColor` | `#f5bde6` | Character-name color |
|
||||
| `subtitleStyle.frequencyDictionary.enabled` | `false` | Color words by frequency rank |
|
||||
| `subtitleStyle.frequencyDictionary.sourcePath` | `""` | Folder with `term_meta_bank_*.json` files. Empty searches the default locations |
|
||||
| `subtitleStyle.frequencyDictionary.topX` | `10000` | Only color words ranked at or below this |
|
||||
| `subtitleStyle.frequencyDictionary.mode` | `"single"` | `single` (one color) or `banded` (five colors, common to rare) |
|
||||
| `subtitleStyle.frequencyDictionary.matchMode` | `"headword"` | Look up by `headword` (dictionary form) or `surface` (text as shown) |
|
||||
| `subtitleStyle.frequencyDictionary.singleColor` | `#f5a97f` | Color for `single` mode |
|
||||
| `subtitleStyle.frequencyDictionary.bandedColors` | see example | Five colors for `banded` mode |
|
||||
| Key | Default | What it does |
|
||||
| ------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `subtitleStyle.primaryDefaultMode` | `"visible"` | Primary bar at startup: `hidden`, `visible`, or `hover` |
|
||||
| `subtitleStyle.css` | see example | CSS for primary subtitles (font, size `35px`, color, shadow, and so on) |
|
||||
| `subtitleStyle.secondary.css` | see example | CSS for secondary subtitles (size `24px`) |
|
||||
| `subtitleStyle.preserveLineBreaks` | `false` | Keep line breaks as mpv shows them instead of one line |
|
||||
| `subtitleStyle.autoPauseVideoOnHover` | `true` | Pause while the mouse is over subtitle text |
|
||||
| `subtitleStyle.autoPauseVideoOnYomitanPopup` | `true` | Pause while a Yomitan popup is open |
|
||||
| `subtitleStyle.autoPauseVideoOnKeyboardMode` | `false` | Pause while keyboard-only mode is on (keyboard or controller toggle). Leaving resumes only a pause it made: a video that was already paused, or that you played or paused yourself meanwhile, stays as it is |
|
||||
| `subtitleStyle.primaryVisibleOnYomitanPopup` | `true` | In hover mode, keep the primary bar visible while a popup is open |
|
||||
| `subtitleStyle.knownWordColor` | `#a6da95` | Known-word highlight color |
|
||||
| `subtitleStyle.knownWordMaturityColors` | see example | `new`, `learning`, `young`, `mature` colors, used when `ankiConnect.knownWords.maturityEnabled` is on |
|
||||
| `subtitleStyle.nPlusOneColor` | `#c6a0f6` | N+1 target word color |
|
||||
| `subtitleStyle.enableJlpt` | `false` | Underline words by JLPT level |
|
||||
| `subtitleStyle.jlptColors` | see example | Underline colors for `N1` to `N5` |
|
||||
| `subtitleStyle.nameMatchEnabled` | `false` | Sync the character dictionary and color character names |
|
||||
| `subtitleStyle.nameMatchImagesEnabled` | `false` | Show small character portraits next to matched names |
|
||||
| `subtitleStyle.nameMatchColor` | `#f5bde6` | Character-name color |
|
||||
| `subtitleStyle.frequencyDictionary.enabled` | `false` | Color words by frequency rank |
|
||||
| `subtitleStyle.frequencyDictionary.sourcePath` | `""` | Folder with `term_meta_bank_*.json` files. Empty searches the default locations |
|
||||
| `subtitleStyle.frequencyDictionary.topX` | `10000` | Only color words ranked at or below this |
|
||||
| `subtitleStyle.frequencyDictionary.mode` | `"single"` | `single` (one color) or `banded` (five colors, common to rare) |
|
||||
| `subtitleStyle.frequencyDictionary.matchMode` | `"headword"` | Look up by `headword` (dictionary form) or `surface` (text as shown) |
|
||||
| `subtitleStyle.frequencyDictionary.singleColor` | `#f5a97f` | Color for `single` mode |
|
||||
| `subtitleStyle.frequencyDictionary.bandedColors` | see example | Five colors for `banded` mode |
|
||||
|
||||
Two CSS custom properties style the hovered word: `--subtitle-hover-token-color` (`#f4dbd6`) and `--subtitle-hover-token-background-color` (`transparent`). Set them inside `subtitleStyle.css`.
|
||||
|
||||
@@ -290,20 +291,20 @@ Adds a modal for choosing mpv's primary and secondary subtitle tracks. Open it w
|
||||
|
||||
### Controller support
|
||||
|
||||
Gamepad input for the overlay, through the browser Gamepad API. Most actions only work while keyboard-only mode is on; the toggle for that mode and the secondary subtitle hold (`controller.bindings.holdSecondarySub`) work either way. Use the `Alt+C` modal to pick a controller and learn bindings, and `Alt+Shift+C` to see raw button and axis values. Default button actions are on [Keyboard shortcuts](/shortcuts).
|
||||
Gamepad input for the overlay, through the browser Gamepad API. Most actions only work while keyboard-only mode is on; the toggle for that mode, the secondary subtitle hold (`controller.bindings.holdSecondarySub`), pause (`toggleMpvPause`) and the subtitle line actions (`previousSubtitle`, `nextSubtitle`, `replaySubtitle`, `playNextSubtitle`) work either way. Use the `Alt+C` modal to pick a controller and learn bindings, and `Alt+Shift+C` to see raw button and axis values. Default button actions are on [Keyboard shortcuts](/shortcuts).
|
||||
|
||||
| Key | Default | What it does |
|
||||
| ---------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `controller.enabled` | `false` | Enable controller support. The `Alt+C` and `Alt+Shift+C` modals stay closed while off |
|
||||
| `controller.smoothScroll` | `true` | Smooth popup scrolling |
|
||||
| `controller.scrollPixelsPerSecond` | `900` | Popup scroll speed |
|
||||
| `controller.horizontalJumpPixels` | `160` | Popup page-jump distance |
|
||||
| `controller.stickDeadzone` | `0.2` | Stick deadzone |
|
||||
| `controller.triggerInputMode` | `"auto"` | `auto`, `digital`, or `analog`. Use `analog` if your L2/R2 report analog values |
|
||||
| `controller.triggerDeadzone` | `0.5` | Trigger threshold for `auto` and `analog` |
|
||||
| `controller.faceButtonLabels` | `"xbox"` | Letters printed on your face buttons. Use `nintendo` if A is on the right and B at the bottom (Switch-style and many 8BitDo pads); PlayStation pads use `xbox` |
|
||||
| `controller.repeatDelayMs` | `320` | Delay before a held button repeats |
|
||||
| `controller.repeatIntervalMs` | `120` | Repeat interval for held buttons |
|
||||
| Key | Default | What it does |
|
||||
| ---------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `controller.enabled` | `false` | Enable controller support. The `Alt+C` and `Alt+Shift+C` modals stay closed while off |
|
||||
| `controller.smoothScroll` | `true` | Smooth popup scrolling |
|
||||
| `controller.scrollPixelsPerSecond` | `900` | Popup scroll speed |
|
||||
| `controller.horizontalJumpPixels` | `160` | Popup page-jump distance |
|
||||
| `controller.stickDeadzone` | `0.2` | Stick deadzone |
|
||||
| `controller.triggerInputMode` | `"auto"` | `auto`, `digital`, or `analog`. Use `analog` if your L2/R2 report analog values |
|
||||
| `controller.triggerDeadzone` | `0.5` | Trigger threshold for `auto` and `analog` |
|
||||
| `controller.faceButtonLabels` | `"xbox"` | Face button style: `xbox`, `nintendo` (A on the right, B at the bottom; Switch-style and many 8BitDo pads) or `playstation` (╳ ○ □ △). **Button Style** in `Alt+C` sets it per controller; this is the default for the others |
|
||||
| `controller.repeatDelayMs` | `320` | Delay before a held button repeats |
|
||||
| `controller.repeatIntervalMs` | `120` | Repeat interval for held buttons |
|
||||
|
||||
Bindings, including the media timing review and duplicate card dialog layouts, are set with `Alt+C` learn mode, which saves them per controller.
|
||||
|
||||
|
||||
Reference in new issue
Block a user