mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: copy/pasting for elements
This commit is contained in:
@@ -202,6 +202,23 @@ export function useEditorActions() {
|
||||
undefined
|
||||
);
|
||||
|
||||
useActionHandler(
|
||||
"copy-selected",
|
||||
() => {
|
||||
if (selectedElements.length === 0) return;
|
||||
useTimelineStore.getState().copySelected();
|
||||
},
|
||||
undefined
|
||||
);
|
||||
|
||||
useActionHandler(
|
||||
"paste-selected",
|
||||
() => {
|
||||
useTimelineStore.getState().pasteAtTime(currentTime);
|
||||
},
|
||||
undefined
|
||||
);
|
||||
|
||||
useActionHandler(
|
||||
"toggle-snapping",
|
||||
() => {
|
||||
|
||||
@@ -63,6 +63,14 @@ const actionDescriptions: Record<
|
||||
"toggle-snapping": { description: "Toggle snapping", category: "Editing" },
|
||||
undo: { description: "Undo", category: "History" },
|
||||
redo: { description: "Redo", category: "History" },
|
||||
"copy-selected": {
|
||||
description: "Copy selected elements",
|
||||
category: "Editing",
|
||||
},
|
||||
"paste-selected": {
|
||||
description: "Paste elements at playhead",
|
||||
category: "Editing",
|
||||
},
|
||||
};
|
||||
|
||||
// Convert key binding format to display format
|
||||
|
||||
Reference in New Issue
Block a user