mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Added beat jump size adjust shortcut
This commit is contained in:
1 parent
0fd5d56a4e
commit
b4dc8949de
3 files changed
+16
-4
No files matched your search
@@ -689,7 +689,8 @@ that number and nothing else — everything derives from it:
|
|||||||
collection picker (Automatic / last-opened / manual), persisted to `userprefs.json`
|
collection picker (Automatic / last-opened / manual), persisted to `userprefs.json`
|
||||||
- ✅ Track prep — audio playback, frequency-colored scrolling waveform, scratch,
|
- ✅ Track prep — audio playback, frequency-colored scrolling waveform, scratch,
|
||||||
beatgrid display + editing, cue/hotcue create/jump/delete, loops; keyboard
|
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
|
- ✅ Track prep Tier 2 — cue-point fine editing / audio export polish
|
||||||
- ✅ Flexible beatgrids — the grid is a marker list end to end (marker-level
|
- ✅ 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
|
commands, piecewise beat math, playhead-derived marker editing). Step 1 of the
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function BeatJumpControls({ beats, onStep, onJump, disabled }: Props) {
|
|||||||
className={BTN}
|
className={BTN}
|
||||||
onClick={() => onStep(-1)}
|
onClick={() => onStep(-1)}
|
||||||
disabled={disabled || atMin}
|
disabled={disabled || atMin}
|
||||||
title="Smaller jump size"
|
title="Smaller jump size (Cmd/Ctrl+↓)"
|
||||||
>
|
>
|
||||||
−
|
−
|
||||||
</button>
|
</button>
|
||||||
@@ -53,7 +53,7 @@ export function BeatJumpControls({ beats, onStep, onJump, disabled }: Props) {
|
|||||||
className={BTN}
|
className={BTN}
|
||||||
onClick={() => onStep(1)}
|
onClick={() => onStep(1)}
|
||||||
disabled={disabled || atMax}
|
disabled={disabled || atMax}
|
||||||
title="Larger jump size"
|
title="Larger jump size (Cmd/Ctrl+↑)"
|
||||||
>
|
>
|
||||||
+
|
+
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -877,7 +877,8 @@ export function PrepStrip({
|
|||||||
|
|
||||||
// ---- keyboard shortcuts ----------------------------------------------
|
// ---- keyboard shortcuts ----------------------------------------------
|
||||||
// Space → play/pause; 1–8 → the matching hotcue slot; Shift+1–8 → delete it.
|
// 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
|
// 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.
|
// latest handlers so the listener attaches once and never goes stale.
|
||||||
const shortcutsRef = useRef({
|
const shortcutsRef = useRef({
|
||||||
@@ -888,6 +889,7 @@ export function PrepStrip({
|
|||||||
onCuePress,
|
onCuePress,
|
||||||
onCueRelease,
|
onCueRelease,
|
||||||
beatJump,
|
beatJump,
|
||||||
|
stepJumpSize,
|
||||||
prevMarker,
|
prevMarker,
|
||||||
nextMarker,
|
nextMarker,
|
||||||
slotCount,
|
slotCount,
|
||||||
@@ -900,6 +902,7 @@ export function PrepStrip({
|
|||||||
onCuePress,
|
onCuePress,
|
||||||
onCueRelease,
|
onCueRelease,
|
||||||
beatJump,
|
beatJump,
|
||||||
|
stepJumpSize,
|
||||||
prevMarker,
|
prevMarker,
|
||||||
nextMarker,
|
nextMarker,
|
||||||
slotCount,
|
slotCount,
|
||||||
@@ -909,6 +912,14 @@ export function PrepStrip({
|
|||||||
// Ignore while typing in a field or with a non-Shift modifier held.
|
// Ignore while typing in a field or with a non-Shift modifier held.
|
||||||
const t = e.target as HTMLElement | null
|
const t = e.target as HTMLElement | null
|
||||||
if (t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable)) return
|
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.metaKey || e.ctrlKey || e.altKey) return
|
||||||
if (e.repeat) return // held key auto-repeats — treat as one press+hold
|
if (e.repeat) return // held key auto-repeats — treat as one press+hold
|
||||||
if (e.code === 'Space') {
|
if (e.code === 'Space') {
|
||||||
|
|||||||
Reference in new issue
Block a user