From 715b79b3a95f87daa41f39ac17b76c94cdc82f2d Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 1 Aug 2023 16:41:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=AD=97=E6=AE=B5=E5=BC=B9=E6=A1=86=E7=83=AD?= =?UTF-8?q?=E9=94=AE=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98=20#5501?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/shortcutKey.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/canvas/utils/shortcutKey.js b/frontend/src/components/canvas/utils/shortcutKey.js index bfed338e7a..232d802851 100644 --- a/frontend/src/components/canvas/utils/shortcutKey.js +++ b/frontend/src/components/canvas/utils/shortcutKey.js @@ -32,8 +32,8 @@ const ignoreComponent = ['de-button', 'de-reset-button'] // 与组件状态无关的操作 const basemap = { [vKey]: paste, - [yKey]: redo, - [zKey]: undo + [gKey]: redo, + [bKey]: undo, } // 组件未锁定状态下可以执行的操作 @@ -41,8 +41,6 @@ const unlockMap = { ...basemap, [cKey]: copy, [xKey]: cut, - [gKey]: compose, - [bKey]: decompose, [dKey]: copyAndPast, [deleteKey]: deleteComponent, [lKey]: lock, @@ -60,7 +58,7 @@ export function listenGlobalKeyDown() { if (keyCode === ctrlKey || keyCode === commandKey) { isCtrlOrCommandDown = true } else if (isCtrlOrCommandDown) { - if (keyCode === zKey || keyCode === yKey || keyCode === dKey || keyCode === sKey || keyCode === enlargeKey) { + if (keyCode === bKey || keyCode === gKey || keyCode === dKey || keyCode === sKey || keyCode === enlargeKey) { e.preventDefault() e.stopPropagation() unlockMap[keyCode]()