Files
Genarrative/src/components/image-editor/ImageCanvasShortcutModel.ts
T
kdletters 820e179be5 新增画布快捷键弹窗
添加画布右上角快捷键入口和独立弹窗

补齐 Windows 画布快捷键与选中图层命令

更新快捷键单测和画布文档
2026-06-22 17:58:00 +08:00

81 lines
3.3 KiB
TypeScript

export type ImageCanvasShortcutStatus = 'ready' | 'new';
export type ImageCanvasShortcutItem = {
action: string;
keys: string[];
status: ImageCanvasShortcutStatus;
};
export type ImageCanvasShortcutSection = {
title: string;
items: ImageCanvasShortcutItem[];
};
export const IMAGE_CANVAS_SHORTCUT_SECTIONS: ImageCanvasShortcutSection[] = [
{
title: '编辑',
items: [
{ action: '撤销', keys: ['Ctrl', 'Z'], status: 'ready' },
{ action: '重做', keys: ['Ctrl', 'Shift', 'Z'], status: 'ready' },
{ action: '全选画布元素', keys: ['Ctrl', 'A'], status: 'new' },
{ action: '复制选中图层', keys: ['Ctrl', 'C'], status: 'new' },
{ action: '粘贴图层', keys: ['Ctrl', 'V'], status: 'new' },
{ action: '剪切选中图层', keys: ['Ctrl', 'X'], status: 'new' },
{ action: '复制一份选中图层', keys: ['Ctrl', 'D'], status: 'new' },
{ action: '删除选中元素', keys: ['Delete / Backspace'], status: 'ready' },
{ action: '取消选择或关闭弹层', keys: ['Esc'], status: 'ready' },
],
},
{
title: '视图',
items: [
{ action: '纵向滚动画布', keys: ['鼠标滚轮'], status: 'ready' },
{ action: '以鼠标位置缩放', keys: ['Ctrl', '鼠标滚轮'], status: 'ready' },
{ action: '显示全部元素', keys: ['Ctrl', '0'], status: 'new' },
{ action: '缩放至 100%', keys: ['Ctrl', '1'], status: 'new' },
{ action: '放大', keys: ['Ctrl', '+'], status: 'new' },
{ action: '缩小', keys: ['Ctrl', '-'], status: 'new' },
{ action: '临时抓手拖动画布', keys: ['Space', '拖拽'], status: 'ready' },
],
},
{
title: '工具',
items: [
{ action: '选择工具', keys: ['V'], status: 'new' },
{ action: '抓手工具', keys: ['H'], status: 'new' },
{ action: '上传素材', keys: ['U'], status: 'new' },
{ action: '生成图片', keys: ['G'], status: 'new' },
{ action: '生成视频', keys: ['Shift', 'V'], status: 'new' },
{ action: '生成音乐', keys: ['M'], status: 'new' },
],
},
{
title: '图层',
items: [
{ action: '多选元素', keys: ['Shift', '点击 / 拖拽'], status: 'ready' },
{ action: '微移选中图层', keys: ['方向键'], status: 'new' },
{ action: '大步移动选中图层', keys: ['Shift', '方向键'], status: 'new' },
{ action: '上移图层层级', keys: ['Ctrl', ']'], status: 'new' },
{ action: '下移图层层级', keys: ['Ctrl', '['], status: 'new' },
{ action: '置顶图层', keys: ['Ctrl', 'Shift', ']'], status: 'new' },
{ action: '置底图层', keys: ['Ctrl', 'Shift', '['], status: 'new' },
{ action: '激活生成占位', keys: ['双击生成占位'], status: 'ready' },
{
action: '选择音频 / 视频图层',
keys: ['Enter / Space'],
status: 'ready',
},
],
},
{
title: '面板与项目',
items: [
{ action: '打开素材面板', keys: ['Alt', '1'], status: 'new' },
{ action: '打开图层面板', keys: ['Alt', '2'], status: 'new' },
{ action: '切换小地图', keys: ['Alt', 'M'], status: 'new' },
{ action: '下载画布素材', keys: ['Ctrl', 'Shift', 'S'], status: 'new' },
{ action: '重命名项目', keys: ['F2'], status: 'new' },
],
},
];