diff --git a/CLAUDE.md b/CLAUDE.md index a619c4f..3c906ee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -689,7 +689,8 @@ that number and nothing else — everything derives from it: collection picker (Automatic / last-opened / manual), persisted to `userprefs.json` - ✅ Track prep — audio playback, frequency-colored scrolling waveform, scratch, beatgrid display + editing, cue/hotcue create/jump/delete, loops; keyboard - shortcuts (Space = play/pause, 1–8 = hotcues, Shift+1–8 = delete). See "Prep engine". + shortcuts (Space = play/pause, 1–8 = hotcues, Shift+1–8 = delete, Cmd/Ctrl+↑/↓ = + beat jump size). See "Prep engine". - ✅ Track prep Tier 2 — cue-point fine editing / audio export polish - ✅ Flexible beatgrids — the grid is a marker list end to end (marker-level commands, piecewise beat math, playhead-derived marker editing). Step 1 of the diff --git a/frontend/src/components/BeatJumpControls.tsx b/frontend/src/components/BeatJumpControls.tsx index 0bea6ed..3c6a7af 100644 --- a/frontend/src/components/BeatJumpControls.tsx +++ b/frontend/src/components/BeatJumpControls.tsx @@ -42,7 +42,7 @@ export function BeatJumpControls({ beats, onStep, onJump, disabled }: Props) { className={BTN} onClick={() => onStep(-1)} disabled={disabled || atMin} - title="Smaller jump size" + title="Smaller jump size (Cmd/Ctrl+↓)" > − @@ -53,7 +53,7 @@ export function BeatJumpControls({ beats, onStep, onJump, disabled }: Props) { className={BTN} onClick={() => onStep(1)} disabled={disabled || atMax} - title="Larger jump size" + title="Larger jump size (Cmd/Ctrl+↑)" > + diff --git a/frontend/src/components/PrepStrip.tsx b/frontend/src/components/PrepStrip.tsx index 2d435c8..c03170c 100644 --- a/frontend/src/components/PrepStrip.tsx +++ b/frontend/src/components/PrepStrip.tsx @@ -877,7 +877,8 @@ export function PrepStrip({ // ---- keyboard shortcuts ---------------------------------------------- // Space → play/pause; 1–8 → the matching hotcue slot; Shift+1–8 → delete it. - // ←/→ → beat jump; Shift+←/→ → step between grid markers. + // ←/→ → beat jump; Shift+←/→ → step between grid markers; Cmd/Ctrl+↑/↓ → + // beat jump size (Shift+↑/↓ is the track table's extend-selection). // Digits are read from e.code (layout-/Shift-independent) and a ref holds the // latest handlers so the listener attaches once and never goes stale. const shortcutsRef = useRef({ @@ -888,6 +889,7 @@ export function PrepStrip({ onCuePress, onCueRelease, beatJump, + stepJumpSize, prevMarker, nextMarker, slotCount, @@ -900,6 +902,7 @@ export function PrepStrip({ onCuePress, onCueRelease, beatJump, + stepJumpSize, prevMarker, nextMarker, slotCount, @@ -909,6 +912,14 @@ export function PrepStrip({ // Ignore while typing in a field or with a non-Shift modifier held. const t = e.target as HTMLElement | null if (t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable)) return + // Cmd (macOS) / Ctrl (Windows, Linux), either accepted as Cmd/Ctrl+A is. + // Repeats allowed: holding it sweeps through the sizes. + if ((e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && + (e.code === 'ArrowUp' || e.code === 'ArrowDown')) { + e.preventDefault() + shortcutsRef.current.stepJumpSize(e.code === 'ArrowUp' ? 1 : -1) + return + } if (e.metaKey || e.ctrlKey || e.altKey) return if (e.repeat) return // held key auto-repeats — treat as one press+hold if (e.code === 'Space') {