Merge pull request #7 from iflan/alt-location

Match the location of the Alt key to the activated Apple key
This commit is contained in:
Will Scullin 2019-01-09 00:55:55 -08:00 committed by GitHub
commit dad9e6f7a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -824,7 +824,11 @@ function _keydown(evt) {
} else if (evt.keyCode == 91 || evt.keyCode == 93) { // Command
keyboard.commandKey(true);
} else if (evt.keyCode == 18) { // Alt
keyboard.optionKey(true);
if (evt.originalEvent.location == 1) {
keyboard.commandKey(true);
} else {
keyboard.optionKey(true);
}
}
}
@ -839,7 +843,11 @@ function _keyup(evt) {
} else if (evt.keyCode == 91 || evt.keyCode == 93) { // Command
keyboard.commandKey(false);
} else if (evt.keyCode == 18) { // Alt
keyboard.optionKey(false);
if (evt.originalEvent.location == 1) {
keyboard.commandKey(false);
} else {
keyboard.optionKey(false);
}
}
}