mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Restore old //e key handling behavior.
This commit is contained in:
parent
fe2b85f6e3
commit
4046a9dbce
@ -49,9 +49,7 @@
|
||||
<div id="subtitle">An Apple //e Emulator in JavaScript</div>
|
||||
</div>
|
||||
<div id="display">
|
||||
<div class="overscan"
|
||||
onkeydown="Apple2._keydown(event);"
|
||||
onkeyup="Apple2._keyup(event);">
|
||||
<div class="overscan">
|
||||
<canvas id="screen" width="560" height="384"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -592,7 +592,7 @@ function processHash(hash) {
|
||||
*/
|
||||
|
||||
function _keydown(evt) {
|
||||
if (!focused && (!evt.metaKey || evt.ctrlKey)) {
|
||||
if (!focused && (!evt.metaKey || evt.ctrlKey || window.e)) {
|
||||
evt.preventDefault();
|
||||
|
||||
var key = keyboard.mapKeyEvent(evt);
|
||||
@ -817,7 +817,6 @@ export function initUI(apple2, disk2, cffa, e) {
|
||||
document.body.addEventListener('mousemove', _mousemove);
|
||||
|
||||
document.querySelectorAll('input,textarea').forEach(function(input) {
|
||||
input.addEventListener('input', function() { focused = true; });
|
||||
input.addEventListener('focus', function() { focused = true; });
|
||||
input.addEventListener('blur', function() { focused = false; });
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user