feat(studio): add M (mute) and Shift+L (loop) keyboard shortcuts#992
Merged
Merged
Conversation
Adds NLE-style hotkeys for muting audio and toggling loop playback in the Studio player, matching the workflow conventions in DaVinci Resolve, Premiere, and Final Cut. - M toggles audio mute (no-op above 1x playback, matching the mute button's existing gating behavior). - Shift+L toggles loop. Ctrl/Cmd+L was considered but is filtered out by shouldIgnorePlaybackShortcutEvent and conflicts with the browser address bar; Shift+L is also consistent with the existing Shift+I / Shift+O modifier pattern. The Shift+L handler runs before the existing plain-L shuttle case so it doesn't also start forward playback. Fixes heygen-com#905
miguel-heygen
approved these changes
May 20, 2026
Collaborator
miguel-heygen
left a comment
There was a problem hiding this comment.
Clean addition. Small scope, well-tested.
Verified:
Shift+Lhandler placed before the existing plainLhandler — correctly prevents fall-through to forward shuttle- Both handlers placed after
if (e.repeat) return— holding the key doesn't rapid-fire toggle Mmute gating (playbackRate <= 1) matches the mute button'sdisabledprop — consistent behaviorCtrl+Lintentionally omitted —shouldIgnorePlaybackShortcutEventalready filtersctrlKey/metaKey/altKey, and Ctrl+L conflicts with browser address bar- 4 tests cover: toggle on/off, no-op above 1x, Shift+L isolation from shuttle, plain L regression guard
- Help panel updated with both shortcuts in the Playback section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds NLE-style keyboard shortcuts for muting audio and toggling loop playback in the Studio player, matching the conventions in DaVinci Resolve, Premiere, and Final Cut.
M— toggle audio mute⇧L— toggle loop playbackFixes #905.
Implementation notes
usePlaybackKeyboard.tsalongside the existing J / K / L / I / O / A / E shortcuts. The Shift+L case runs before the existing plain-Lshuttle case so Shift+L doesn't also kick off forward playback.Mmirrors the mute button's gating: above 1x playback, audio is force-muted byshouldMutePreviewAudio, so the shortcut becomes a no-op there (just like the button isdisabled).Ctrl+Las an alternative. It's intentionally not wired up becauseshouldIgnorePlaybackShortcutEventalready filters out events withctrlKey/metaKey/altKey, and Ctrl/Cmd+L conflicts with the browser address-bar shortcut.Shift+Lis also consistent with the existingShift+I/Shift+Omodifier pattern in this hook.PlayerControls.tsx) lists the two new shortcuts in the "Playback" section.Test plan
bun run --filter @hyperframes/studio test— all 601 studio tests pass, including 4 new tests covering: M toggles mute, M is a no-op above 1x, Shift+L toggles loop without starting shuttle, plain L still starts shuttle (regression guard).bunx oxlint+bunx oxfmt --checkon changed files — clean.bun run --filter @hyperframes/studio typecheck— clean.M(mute icon toggles), pressShift+L(loop icon toggles), confirm plainLstill starts forward shuttle.