Skip to content

Honor user video shortcuts in fullscreen video window#11398

Merged
niksedk merged 1 commit into
mainfrom
fix-fullscreen-shortcuts-11392
Jun 4, 2026
Merged

Honor user video shortcuts in fullscreen video window#11398
niksedk merged 1 commit into
mainfrom
fix-fullscreen-shortcuts-11392

Conversation

@niksedk
Copy link
Copy Markdown
Member

@niksedk niksedk commented Jun 4, 2026

Summary

  • Fixes [SE5 RC2] [BUG] Video jump time is wrong in full screen for libmpv player #11392: in fullscreen, Right/Left arrows always jumped 2 sec and Up/Down always changed volume by 2, regardless of the user's configured "1 sec / 100 ms / 5 sec" jump bindings.
  • Root cause: FullScreenVideoWindow's KeyDown handler hardcoded these keys before its local shortcut manager, and the local shortcut manager only knew about two commands (toggle fullscreen, show media info). Reordering alone wasn't enough — the user-configured shortcuts had no path to fire.

Changes

  • MainViewModel.VideoFullScreen now builds an extraBindings list of the relevant video commands and passes it to FullScreenVideoWindow. The commands themselves operate on GetVideoPlayerControl(), which already returns _fullScreenVideoPlayerControl while fullscreen is open, so no per-fullscreen variants are needed.
    • Commands forwarded: Video100Ms{Back,Forward}, Video500Ms{Back,Forward}, VideoOneSecond{Back,Forward}, VideoOneFrame{Back,Forward}, VideoMoveCustom1{Back,Forward}, VideoMoveCustom2{Back,Forward}, Play, Pause, TogglePlayPause, TogglePlayPause2, VideoToggleBrightness.
  • FullScreenVideoWindow gains an optional extraBindings constructor parameter, registers each into the local shortcut manager, and the KeyDown handler is reordered:
    1. Esc/F11 — always close.
    2. User-configured shortcuts — first chance to claim the key.
    3. Hardcoded Space / Right / Left / Up / Down — fallbacks only when no user binding matched.
  • Volume Up/Down stay hardcoded because there are no Volume RelayCommands in the view model; the fullscreen defaults are the only keyboard-volume path.

Test plan

  • In Options > Shortcuts, set Right = "Video 1 sec forward" and Left = "Video 1 sec back". Enter fullscreen and confirm each press moves exactly 1 sec.
  • Repeat with "100 ms" and "500 ms" bindings — confirm the jumps match the configured magnitude.
  • With no Right/Left binding (or bindings cleared), confirm fullscreen still falls back to the original 2-second jumps.
  • Confirm Space play/pause still works (with and without a TogglePlayPause binding).
  • Confirm Up/Down still change volume by 2.
  • Confirm Esc and F11 still exit fullscreen.
  • Confirm the existing fullscreen-toggle key (e.g. F) still exits fullscreen (and the focus restoration from [SE5 RC2] [BUG] Video full screen shortcut works only once #11393 still works).
  • Confirm Show Media Information shortcut still opens with the fullscreen window as owner.

🤖 Generated with Claude Code

The fullscreen window's KeyDown handler hardcoded Right/Left to ±2 sec
and Up/Down to ±2 volume, running before its local shortcut manager.
The local shortcut manager also only knew about two commands (toggle
fullscreen, show media info), so even if the order were swapped, the
user's "1 sec forward", "100 ms back", etc. bindings had no path to
fire while fullscreen was open.

Two changes:

* MainViewModel.VideoFullScreen now builds an extraBindings list of the
  relevant video commands (jump back/forward 100 ms / 500 ms / 1 sec /
  one frame / custom 1 / custom 2, play, pause, toggle play-pause x2,
  toggle brightness), each paired with its configured keys from
  Se.Settings.Shortcuts, and passes it to FullScreenVideoWindow. The
  commands themselves operate on GetVideoPlayerControl(), which returns
  the fullscreen player while fullscreen is open, so no per-fullscreen
  variants are needed.

* FullScreenVideoWindow accepts the new extraBindings parameter and
  registers each into its local shortcut manager. The KeyDown handler
  is reordered: Esc/F11 still always close, user shortcuts run next,
  and the Space/Right/Left/Up/Down hardcoded handlers are demoted to
  fallbacks for users who haven't bound those keys. Volume Up/Down stay
  hardcoded because there are no Volume RelayCommands in the view
  model.

Fixes #11392

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit 27759dc into main Jun 4, 2026
1 of 3 checks passed
@niksedk niksedk deleted the fix-fullscreen-shortcuts-11392 branch June 4, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SE5 RC2] [BUG] Video jump time is wrong in full screen for libmpv player

1 participant