mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-01 05:40:50 -07:00
feat(overlay): forward mpv mouse and wheel bindings through overlay
- Accept WHEEL_UP/DOWN/LEFT/RIGHT (with modifiers) in keybindings, the plugin, and the settings key editor - Forward mpv's MBTN_* and WHEEL_* bindings from the overlay so double-click fullscreen, wheel volume, and similar inputs work on Hyprland; SubMiner bindings and right-click pause still win - Notify the overlay via mpv-input-bindings:changed when mpv's key set changes, fixing dead imported keys when the overlay loads before mpv connects - Sync README requirements/quick start with the installation guide and fix the Arch MeCab install command (AUR mecab-git)
This commit is contained in:
@@ -48,9 +48,17 @@ Automatic mpv keyboard discovery uses the `get-mpv-input-bindings` IPC request a
|
||||
configured keys, including disabled entries. `src/shared/mpv-input-bindings.ts`
|
||||
validates discovered keys and translates browser input. The renderer's
|
||||
`handlers/mpv-input-forwarding.ts` keeps the session lookup, coalesces asynchronous
|
||||
refreshes, and releases held keys on blur or disposal. `handlers/keyboard.ts` runs
|
||||
refreshes, and releases held keys on blur or disposal. Discovered `WHEEL_*` bindings forward
|
||||
as `keypress <key> <notches>` (Chromium reports 120 px per notch), which matches mpv's own
|
||||
precise-scroll scaling. `MBTN_*` buttons forward as held `keydown`/`keyup` when mpv binds the
|
||||
button or its `_DBL` variant, so mpv synthesizes double-clicks itself. Configured keybindings and
|
||||
the built-in right-click pause run first. Forwarding is the only way pointer input reaches mpv on
|
||||
Hyprland, where the overlay cannot be made click-through. `handlers/keyboard.ts` runs
|
||||
this fallback after SubMiner controls and refreshes on startup, a delayed startup
|
||||
pass, focus, and binding reload. Discovery does not enter compiled session bindings,
|
||||
pass, focus, binding reload, and the `mpv-input-bindings:changed` event. Main sends
|
||||
that event from `session-bindings-runtime.ts` when mpv's discovered key set changes,
|
||||
including the first discovery after connecting, because the overlay often loads
|
||||
before mpv connects and the compiled session bindings may not change. Discovery does not enter compiled session bindings,
|
||||
the plugin artifact, persistent config, or session help.
|
||||
|
||||
The subtitle sidebar consumes parsed cues through `SubtitleSidebarSnapshot`. Its `sourceKey`
|
||||
|
||||
Reference in New Issue
Block a user