Skip to content

开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.

fix(hotkey): prevent switch arrow creation mode when mod+a #195 (#200)

pubuzhixing81512b3c8d3c9
diff --git a/packages/drawnix/src/plugins/with-hotkey.ts b/packages/drawnix/src/plugins/with-hotkey.ts
index 9f65cba..ea5d074 100644
--- a/packages/drawnix/src/plugins/with-hotkey.ts
+++ b/packages/drawnix/src/plugins/with-hotkey.ts
@@ -61,7 +61,7 @@ export const buildDrawnixHotkeyPlugin = (
BoardTransforms.updatePointerType(board, FreehandShape.feltTipPen);
updateAppState({ pointer: FreehandShape.feltTipPen });
}
- if (event.key === 'a') {
+ if (event.key === 'a' && !isHotkey(['mod+a'])(event)) {
setCreationMode(board, BoardCreationMode.drawing);
BoardTransforms.updatePointerType(board, ArrowLineShape.straight);
updateAppState({ pointer: ArrowLineShape.straight });