Dual-display demo with side-by-side MDA and CGA screens

This commit is contained in:
Jeff Parsons 2015-05-23 14:56:31 -07:00 committed by jeffpar
commit cd38446f68
7 changed files with 96 additions and 28 deletions

View file

@ -984,7 +984,14 @@ Keyboard.prototype.setBinding = function(sHTMLType, sBinding, control)
if (this.bindings[id] === undefined) {
switch (sBinding) {
case "kbd":
this.bindings[id] = control;
/*
* Recording the binding ID prevents multiple controls (or components) from attempting to erroneously
* bind a control to the same ID, but in the case of a "dual display" configuration, we actually want
* to allow BOTH video components to call setBinding() for "kbd", so that it doesn't matter which
* display the user gives focus to.
*
* this.bindings[id] = control;
*/
control.onkeydown = function onKeyDown(event) {
return kbd.onKeyDown(event, true);
};