feat(studio): add M (mute) and Shift+L (loop) keyboard shortcuts#993
Closed
hg-oneeyekeh wants to merge 1 commit into
Closed
feat(studio): add M (mute) and Shift+L (loop) keyboard shortcuts#993hg-oneeyekeh wants to merge 1 commit into
hg-oneeyekeh wants to merge 1 commit into
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
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.