mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Fix shift/control highlighting
This commit is contained in:
parent
ed6d9c8c82
commit
345b7b25f4
@ -680,6 +680,10 @@ function _keydown(evt) {
|
||||
elem.mozRequestFullScreen();
|
||||
}
|
||||
}
|
||||
} else if (evt.keyCode == 16) { // Shift
|
||||
keyboard.shiftKey(true);
|
||||
} else if (evt.keyCode == 17) { // Control
|
||||
keyboard.controlKey(true);
|
||||
} else if (!focused && (!evt.metaKey || evt.ctrlKey)) {
|
||||
evt.preventDefault();
|
||||
|
||||
@ -695,8 +699,15 @@ function _keydown(evt) {
|
||||
function _keyup(evt) {
|
||||
_key = 0xff;
|
||||
|
||||
if (!focused)
|
||||
io.keyUp();
|
||||
if (evt.keyCode == 16) { // Shift
|
||||
keyboard.shiftKey(false);
|
||||
} else if (evt.keyCode == 17) { // Control
|
||||
keyboard.controlKey(false);
|
||||
} else {
|
||||
if (!focused) {
|
||||
io.keyUp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateScreen() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user