diff --git a/src/Editor/InitRightMenu.ts b/src/Editor/InitRightMenu.ts index b4cd48b91..1c812d757 100644 --- a/src/Editor/InitRightMenu.ts +++ b/src/Editor/InitRightMenu.ts @@ -63,6 +63,7 @@ export async function InitRightMenu(type?: RightMenuType, kwlist?: KeyWord[], ne if (type === RightMenuType.Selected) { RightMenu.push(...[ + { key: "ESC", msg: `取消选中` }, { key: "DEL", msg: `删除` }, { key: "M", msg: `移动` }, { key: "O", msg: `旋转` }, diff --git a/src/Editor/MouseControls.ts b/src/Editor/MouseControls.ts index a0d5cfafd..a3d9e543b 100644 --- a/src/Editor/MouseControls.ts +++ b/src/Editor/MouseControls.ts @@ -54,6 +54,9 @@ export class MouseControls if (lastCmd) commandMachine.ExecCommand(lastCmd); break; + case "ESC": + this.m_Ed.m_SelectCtrl.Cancel(); + break; case "C"://复制 if (res.Parent === "最近的输入")