mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
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:
commit
dad9e6f7a5
|
@ -824,9 +824,13 @@ function _keydown(evt) {
|
|||
} else if (evt.keyCode == 91 || evt.keyCode == 93) { // Command
|
||||
keyboard.commandKey(true);
|
||||
} else if (evt.keyCode == 18) { // Alt
|
||||
if (evt.originalEvent.location == 1) {
|
||||
keyboard.commandKey(true);
|
||||
} else {
|
||||
keyboard.optionKey(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _keyup(evt) {
|
||||
if (!focused)
|
||||
|
@ -839,9 +843,13 @@ function _keyup(evt) {
|
|||
} else if (evt.keyCode == 91 || evt.keyCode == 93) { // Command
|
||||
keyboard.commandKey(false);
|
||||
} else if (evt.keyCode == 18) { // Alt
|
||||
if (evt.originalEvent.location == 1) {
|
||||
keyboard.commandKey(false);
|
||||
} else {
|
||||
keyboard.optionKey(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateScreen() {
|
||||
var green = $('#green_screen').prop('checked');
|
||||
|
|
Loading…
Reference in New Issue
Block a user