1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix shortcut key handling

This commit is contained in:
Kazuhito Yokoi 2020-01-14 17:18:46 +09:00
parent 8801ace247
commit 3f72eb51a0

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() {