mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
0ea19f0d9d
commit
9ac8c6f603
1 changed files with 2 additions and 6 deletions
|
|
@ -343,12 +343,8 @@ export const keymap = {
|
|||
keymapStr += Constants.KEYCODE[event.keyCode][0];
|
||||
}
|
||||
} else if (event.code.startsWith("Digit") || event.code.startsWith("Key") || event.code.startsWith("Numpad")) {
|
||||
const codeKey = event.code.substring(event.code.length - 1).toUpperCase();
|
||||
if (!event.altKey ||
|
||||
(event.altKey && !["I", "E", "N", "U"].includes(codeKey)) // Mac 编辑器中 alt+I 等字符无法清空
|
||||
) {
|
||||
// 新版 Electron 可以支持 Alt["I", "E", "N", "U"],故移除原有判断
|
||||
keymapStr += event.code.substring(event.code.length - 1).toUpperCase();
|
||||
}
|
||||
} else {
|
||||
keymapStr += event.key === "Unidentified" ? "" : (event.key.length > 1 ? event.key : event.key.toUpperCase());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue