Files
ai-agent/flowgram-editor/src/shortcuts/shortcuts.ts
T

29 lines
919 B
TypeScript
Raw Normal View History

2026-07-27 19:04:15 +08:00
/**
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
* SPDX-License-Identifier: MIT
*/
import { FreeLayoutPluginContext, ShortcutsRegistry } from '@flowgram.ai/free-layout-editor';
import { ZoomOutShortcut } from './zoom-out';
import { ZoomInShortcut } from './zoom-in';
import { SelectAllShortcut } from './select-all';
import { PasteShortcut } from './paste';
import { ExpandShortcut } from './expand';
import { DeleteShortcut } from './delete';
import { CopyShortcut } from './copy';
import { CollapseShortcut } from './collapse';
export function shortcuts(shortcutsRegistry: ShortcutsRegistry, ctx: FreeLayoutPluginContext) {
shortcutsRegistry.addHandlers(
new CopyShortcut(ctx),
new PasteShortcut(ctx),
new SelectAllShortcut(ctx),
new CollapseShortcut(ctx),
new ExpandShortcut(ctx),
new DeleteShortcut(ctx),
new ZoomInShortcut(ctx),
new ZoomOutShortcut(ctx)
);
}