diff --git a/packages/lb-annotation/src/constant/keyCode.ts b/packages/lb-annotation/src/constant/keyCode.ts index f9fd2873e..43a3b04cc 100644 --- a/packages/lb-annotation/src/constant/keyCode.ts +++ b/packages/lb-annotation/src/constant/keyCode.ts @@ -20,6 +20,8 @@ enum EKeyCode { One = 49, Two = 50, Three = 51, + Four = 52, + NumberFour = 100, Delete = 46, F11 = 122, Space = 32, diff --git a/packages/lb-annotation/src/core/toolOperation/pointCloud2DRectOperation.ts b/packages/lb-annotation/src/core/toolOperation/pointCloud2DRectOperation.ts index 225765686..c1e592503 100644 --- a/packages/lb-annotation/src/core/toolOperation/pointCloud2DRectOperation.ts +++ b/packages/lb-annotation/src/core/toolOperation/pointCloud2DRectOperation.ts @@ -58,7 +58,7 @@ class PointCloud2DRectOperation extends RectOperation { } public onKeyDown(e: KeyboardEvent) { - if (this.checkMode || ![EKeyCode.Delete, EKeyCode.R].includes(e.keyCode)) { + if (this.checkMode || ![EKeyCode.Delete, EKeyCode.Four, EKeyCode.NumberFour].includes(e.keyCode)) { return; } diff --git a/packages/lb-annotation/src/core/toolOperation/rectOperation.ts b/packages/lb-annotation/src/core/toolOperation/rectOperation.ts index bef690920..77b82aa92 100644 --- a/packages/lb-annotation/src/core/toolOperation/rectOperation.ts +++ b/packages/lb-annotation/src/core/toolOperation/rectOperation.ts @@ -1325,7 +1325,7 @@ class RectOperation extends BasicToolOperation { return; } - const { keyCode } = e; + const { keyCode, ctrlKey } = e; switch (keyCode) { case EKeyCode.Ctrl: if (this.drawingRect) { @@ -1392,8 +1392,11 @@ class RectOperation extends BasicToolOperation { break; } - case EKeyCode.R: { - this.resizeRect(); + case EKeyCode.Four: + case EKeyCode.NumberFour: { + if (ctrlKey) { + this.resizeRect(); + } break; } diff --git a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.tsx b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.tsx index c39bdd97b..9f5f49288 100644 --- a/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.tsx +++ b/packages/lb-components/src/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.tsx @@ -197,7 +197,7 @@ const DeletePoint = { const Image2DBoxScale = { name: 'Image2DBoxScale', icon: Image2DBoxScaleSvg, - shortCut: ['R'], + shortCut: ['Ctrl', '4'], noticeInfo: 'SelectedRect', };