Merge pull request #179 from FabLrc/feature/speed-shortcut-configurable

fix: Add configurable shortcut for speed adjustment in TimelineEditor
This commit is contained in:
Sid
2026-03-01 16:10:58 -08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
@@ -967,7 +967,7 @@ export default function TimelineEditor({
if (matchesShortcut(e, keyShortcuts.addAnnotation, isMac)) {
handleAddAnnotation();
}
if (e.key === 's' || e.key === 'S') {
if (matchesShortcut(e, keyShortcuts.addSpeed, isMac)) {
handleAddSpeed();
}
+3
View File
@@ -1,6 +1,7 @@
export const SHORTCUT_ACTIONS = [
'addZoom',
'addTrim',
'addSpeed',
'addAnnotation',
'addKeyframe',
'deleteSelected',
@@ -67,6 +68,7 @@ export function findConflict(
export const DEFAULT_SHORTCUTS: ShortcutsConfig = {
addZoom: { key: 'z' },
addTrim: { key: 't' },
addSpeed: { key: 's' },
addAnnotation: { key: 'a' },
addKeyframe: { key: 'f' },
deleteSelected: { key: 'd', ctrl: true },
@@ -76,6 +78,7 @@ export const DEFAULT_SHORTCUTS: ShortcutsConfig = {
export const SHORTCUT_LABELS: Record<ShortcutAction, string> = {
addZoom: 'Add Zoom',
addTrim: 'Add Trim',
addSpeed: 'Add Speed',
addAnnotation: 'Add Annotation',
addKeyframe: 'Add Keyframe',
deleteSelected: 'Delete Selected',