From 763be112301c7d1cc46debf65140dd734c0fc078 Mon Sep 17 00:00:00 2001 From: cweijan Date: Sun, 29 Sep 2024 19:39:53 +0800 Subject: [PATCH] Update preventMacOptionKey. --- resource/vditor/util.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/vditor/util.js b/resource/vditor/util.js index 8737d5b..da4a89a 100644 --- a/resource/vditor/util.js +++ b/resource/vditor/util.js @@ -308,7 +308,8 @@ export const autoSymbol = (handler, editor, config) => { e.preventDefault(); return handler.emit("editInVSCode", true); } - if (isMac && e.altKey && e.shiftKey && config.preventMacOptionKey) { + + if (isMac && config.preventMacOptionKey && e.altKey && e.shiftKey && ['Digit1', 'Digit2', 'KeyW'].includes(e.code)) { return e.preventDefault(); } if (e.code == 'F12') return handler.emit('developerTool')