Completed Keys factoring

This commit is contained in:
Jeff Parsons 2016-09-15 08:18:37 -07:00
commit 5f622303b4
17 changed files with 3367 additions and 3853 deletions

View file

@ -45,7 +45,6 @@ if (DEBUGGER) {
var X86 = require("./x86");
var X86Seg = require("./x86seg");
var Interrupts = require("./interrupts");
var Keyboard = require("./keyboard");
var Messages = require("./messages");
var Memory = require("./memory");
}

View file

@ -313,18 +313,6 @@ Keyboard.SCANCODE = {
/* 0xE1 */ EXTEND2: 225
};
/**
* The set of values that a browser may store in the 'location' property of a keyboard event object
* which we also support.
*
* @enum {number}
*/
Keyboard.LOCATION = {
LEFT: 1,
RIGHT: 2,
NUMPAD: 3
};
/**
* These internal "shift key" states are used to indicate BOTH the physical shift-key states (in bitsState)
* and the simulated shift-key states (in bitsStateSim). The LOCK keys are problematic in both cases: the
@ -2116,7 +2104,7 @@ Keyboard.prototype.onKeyDown = function(event, fDown)
if (Keyboard.SIMCODES[keyCode + Keys.KEYCODE.ONDOWN]) {
simCode += Keys.KEYCODE.ONDOWN;
if (event.location == Keyboard.LOCATION.RIGHT) {
if (event.location == Keys.LOCATION.RIGHT) {
simCode += Keys.KEYCODE.ONRIGHT;
}