Repository navigation
feat(transport): L shortcut to toggle loop mode - #16
Merged
Merged
Conversation
Adds a focus-independent keyboard shortcut for toggling loop mode, mirroring the existing IN/OUT (I/O) shortcuts. Behaviour matches the LOOP button: turns loop off if active, otherwise creates a 2-second region from the playhead. The shortcut auto-registers with the help overlay (?), where its description switches between "Loop a 2-second region from the playhead" and "Disable loop" depending on current state, mirroring how the I/O entries adapt to loop context. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
L(andShift+L) as a focus-independent keyboard shortcut to toggle loop mode in the editor — mirrors the IN/OUT shortcuts (I/O).?) under TRANSPORT; description swaps between "Loop a 2-second region from the playhead" and "Disable loop" based on current state.toggleLoop()helper used by both the click handler and the keydown handler.Why
Loop-toggle was the only transport function without a keyboard shortcut. Pattern follows the existing
IN/OUTshortcuts (lower- + uppercase both bound,e.preventDefault(), INPUT/TEXTAREA guard, knob-focus guard).Test plan
Lwhile loop is off → LOOP button glows orange, region appears on timelineLwhile loop is on → button greys out, region clearslandShift+L)?) shows the new entry under TRANSPORT with the loop icon and a state-dependent descriptionwindow, only skips when anINPUT/TEXTAREA/ contentEditable / knob is focused (matches all other editor shortcuts)🤖 Generated with Claude Code