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:
parent
8801ace247
commit
3f72eb51a0
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user