diff --git a/src/components/video-editor/timeline/TimelineEditor.tsx b/src/components/video-editor/timeline/TimelineEditor.tsx index 17a3767..2b03685 100644 --- a/src/components/video-editor/timeline/TimelineEditor.tsx +++ b/src/components/video-editor/timeline/TimelineEditor.tsx @@ -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(); } diff --git a/src/lib/shortcuts.ts b/src/lib/shortcuts.ts index 75ccce9..847c753 100644 --- a/src/lib/shortcuts.ts +++ b/src/lib/shortcuts.ts @@ -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 = { addZoom: 'Add Zoom', addTrim: 'Add Trim', + addSpeed: 'Add Speed', addAnnotation: 'Add Annotation', addKeyframe: 'Add Keyframe', deleteSelected: 'Delete Selected',