When a key is required to dismiss a PCx86 machine diagnostics screen, make sure that key isn't also passed on to the machine

This commit is contained in:
Jeff Parsons 2017-08-09 12:44:54 -07:00 • committed by Jeff Parsons
commit 8523800d8c
9 changed files with 1371 additions and 1347 deletions

View file

@ -1499,9 +1499,12 @@ class Keyboard extends Component {
var fPass = true;
var fPress = false;
var fIgnore = false;
var keyCode = event.keyCode;
if (!this.cmp.notifyKbdEvent(event, fDown)) {
return false;
}
this.sInjectBuffer = ""; // actual key events should stop any injection in progress
Component.processScript(this.idMachine); // and any script, too
@ -1645,9 +1648,11 @@ class Keyboard extends Component {
event = event || window.event;
var keyCode = event.which || event.keyCode;
this.sInjectBuffer = ""; // actual key events should stop any injection currently in progress
if (!this.cmp.notifyKbdEvent(event)) {
return false;
}
this.cmp.notifyKbdEvent(event);
this.sInjectBuffer = ""; // actual key events should stop any injection currently in progress
if (this.fAllDown) {
var simCode = this.checkActiveKey();