diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-08-28 22:37:51 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-08-28 22:37:51 +0200 |
| commit | a7d90f7eac90966920c750134d7de9b611b2c38f (patch) | |
| tree | db8a33eb12c6294cc0000caf05c600fe3c33069e /apps/web/src/hooks/use-editor-actions.ts | |
| parent | 70a9bfebb196d5c0bde35ce0a165b696bb9ae1d0 (diff) | |
| download | opencut-a7d90f7eac90966920c750134d7de9b611b2c38f.tar.gz | |
feat: copy/pasting for elements
Diffstat (limited to 'apps/web/src/hooks/use-editor-actions.ts')
| -rw-r--r-- | apps/web/src/hooks/use-editor-actions.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/web/src/hooks/use-editor-actions.ts b/apps/web/src/hooks/use-editor-actions.ts index 81500416..974f9db5 100644 --- a/apps/web/src/hooks/use-editor-actions.ts +++ b/apps/web/src/hooks/use-editor-actions.ts @@ -203,6 +203,23 @@ export function useEditorActions() { ); useActionHandler( + "copy-selected", + () => { + if (selectedElements.length === 0) return; + useTimelineStore.getState().copySelected(); + }, + undefined + ); + + useActionHandler( + "paste-selected", + () => { + useTimelineStore.getState().pasteAtTime(currentTime); + }, + undefined + ); + + useActionHandler( "toggle-snapping", () => { toggleSnapping(); |
