🐛 fix:修复ctrl等热键修改不生效的问题

This commit is contained in:
layyback 2022-03-23 11:11:35 +08:00
parent cd4036a805
commit e0d0de4baf

View File

@ -184,15 +184,15 @@ const changeShortCut = (e, key) => {
}
if (e.ctrlKey && e.keyCode !== 17) {
const compose = `Ctrl+${keycodes[e.keyCode].toUpperCase()}`;
state.perf.shortCut[key] = compose;
state.shortCut[key] = compose;
}
if (e.shiftKey && e.keyCode !== 16) {
const compose = `Shift+${keycodes[e.keyCode].toUpperCase()}`;
state.perf.shortCut[key] = compose;
state.shortCut[key] = compose;
}
if (e.metaKey && e.keyCode !== 93) {
const compose = `Command+${keycodes[e.keyCode].toUpperCase()}`;
state.perf.shortCut[key] = compose;
state.shortCut[key] = compose;
}
};