Fix shortcut key handling

This commit is contained in:
Kazuhito Yokoi 2020-01-14 17:18:46 +09:00
parent 8801ace247
commit 3f72eb51a0
1 changed files with 4 additions and 5 deletions

View File

@ -17,21 +17,20 @@
var os = require("os");
var shortCutKeyMap = {
"selectAll": ['Control', 'a', 'Control'],
"selectAll": ['Control', 'a', 'a', 'Control'],
"selectToEnd": ['Control', 'Shift', 'End', 'Shift', 'Control'],
};
var shortCutKeyMapForMac = {
"selectAll": ['Command', 'a', 'Command'],
"selectAll": ['Command', 'a', 'a', 'Command'],
"selectToEnd": ['Command', 'Shift', 'ArrowDown', 'Shift', 'Command'],
};
function getShortCutKey(type) {
if (os.type() === "Darwin") {
if (os.type() === 'Darwin') {
return shortCutKeyMapForMac[type];
} else {
return shortCutKeyMap[type];
}
return shortCutKeyMap[type];
}
function selectAll() {