Fixed self-starting machine.xml files (broken by recent async XML load changes)

This commit is contained in:
Jeff Parsons 2014-11-11 12:19:21 -08:00 committed by jeffpar
commit 4c2a5b7cd5
8 changed files with 58 additions and 58 deletions

View file

@ -758,4 +758,4 @@ function Rm(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],g);Rm(a,b,c)}})}else c(a,null)}
function Sm(a,b,c,d){function e(a){if(void 0===l){var b=h&&D(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ja(a))}function f(a){e("Error: "+a);n&&g();n=!1}function g(){0==--Lm&&Ja(!0)}var h,l,n=!0;Lm++;try{if(h=window.document.getElementById(a)){c||(c="/versions/pcjs/1.15.9/components.xsl");var q=function(a,d){if(d){var l=function(a,l){if(l)if(l)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var n=d.transformNode(l);n?(h.outerHTML=n,g()):f("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(n=new XSLTProcessor,n.importStylesheet(l),(n=n.transformToFragment(d,window.document))?(h.parentNode.replaceChild(n,h),g()):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f("failed to load XSL file: "+c);else f(a)};d?Mm(c,null,null,!1,e,l):f("failed to load XML file: "+b)}else f(a)};"<"!=b.charAt(0)?Mm(b,a,d,!0,e,q):Nm(b,null,a,d,!1,e,q)}else f("failed to find machine element: "+a)}catch(r){f(r.message)}return n}
window.embedPC=function(a,b,c,d){return Sm(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;Ja(!1);})();
window.embedPC=function(a,b,c,d){Ja(!1);return Sm(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();

View file

@ -644,4 +644,4 @@ function Bk(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],h);Bk(a,b,c)}})}else c(a,null)}
function Ck(a,b,c,d){function e(a){if(void 0===m){var b=g&&A(g,"machine-warning");m=b&&b[0]||g}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&h();n=!1}function h(){0==--yk&&ya(!0)}var g,m,n=!0;yk++;try{if(g=window.document.getElementById(a)){c||(c="/versions/pcjs/1.15.9/components.xsl");var q=function(a,d){if(d){var m=function(a,m){if(m)if(m)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var n=d.transformNode(m);n?(g.outerHTML=n,h()):f("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(n=new XSLTProcessor,n.importStylesheet(m),(n=n.transformToFragment(d,window.document))?(g.parentNode.replaceChild(n,g),h()):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f("failed to load XSL file: "+c);else f(a)};d?zk(c,null,null,!1,e,m):f("failed to load XML file: "+b)}else f(a)};"<"!=b.charAt(0)?zk(b,a,d,!0,e,q):Ak(b,null,a,d,!1,e,q)}else f("failed to find machine element: "+a)}catch(w){f(w.message)}return n}
window.embedPC=function(a,b,c,d){return Ck(a,b,c,d)};window.enableEvents=ya;window.sendEvent=za;ya(!1);})();
window.embedPC=function(a,b,c,d){ya(!1);return Ck(a,b,c,d)};window.enableEvents=ya;window.sendEvent=za;})();

View file

@ -415,12 +415,12 @@ Keyboard.SCANCODE = {
* TODO: Implement the above behaviors.
*
* All key identifiers must be quotable using single-quotes, because that's how components.xsl will encode them
* in the "data-value" attribute of the corresponding HTML control. Which, in turn, is why the single-quote
* *inside* the "data-value" attribute of the corresponding HTML control. Which, in turn, is why the single-quote
* key is defined as 'quote' rather than "'". Similarly, if there was unshifted "double-quote" key, it could
* not be called '"', because XML files must quote all their bindings using double-quotes.
* not be called '"', because components.xsl quotes the *entire* "data-value" attribute using double-quotes.
*
* In the (informal) numbering of keys below, two keys are deliberately numbered 84, reflecting the fact that
* the 'sysreq' key was added to the 84-key keyboard but then dropped from the 101-key keyboard.
* the 'sysreq' key was added to the 84-key keyboard but then dropped from the 101-key keyboard as a stand-alone key.
*
* @enum {number}
*/
@ -553,51 +553,51 @@ Keyboard.aSoftCodes = {
Keyboard.aKeyCodes = {};
Keyboard.aKeyCodes[Keyboard.KEYCODE.ESC + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.ONE;
Keyboard.aKeyCodes[Keyboard.ASCII['1']] = Keyboard.SCANCODE.ONE;
Keyboard.aKeyCodes[Keyboard.ASCII['!']] = Keyboard.SCANCODE.ONE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['!']] = Keyboard.SCANCODE.ONE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['2']] = Keyboard.SCANCODE.TWO;
Keyboard.aKeyCodes[Keyboard.ASCII['@']] = Keyboard.SCANCODE.TWO | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['@']] = Keyboard.SCANCODE.TWO | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['3']] = Keyboard.SCANCODE.THREE;
Keyboard.aKeyCodes[Keyboard.ASCII['#']] = Keyboard.SCANCODE.THREE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['#']] = Keyboard.SCANCODE.THREE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['4']] = Keyboard.SCANCODE.FOUR;
Keyboard.aKeyCodes[Keyboard.ASCII['$']] = Keyboard.SCANCODE.FOUR | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['$']] = Keyboard.SCANCODE.FOUR | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['5']] = Keyboard.SCANCODE.FIVE;
Keyboard.aKeyCodes[Keyboard.ASCII['%']] = Keyboard.SCANCODE.FIVE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['%']] = Keyboard.SCANCODE.FIVE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['6']] = Keyboard.SCANCODE.SIX;
Keyboard.aKeyCodes[Keyboard.ASCII['^']] = Keyboard.SCANCODE.SIX | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['^']] = Keyboard.SCANCODE.SIX | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['7']] = Keyboard.SCANCODE.SEVEN;
Keyboard.aKeyCodes[Keyboard.ASCII['&']] = Keyboard.SCANCODE.SEVEN | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['&']] = Keyboard.SCANCODE.SEVEN | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['8']] = Keyboard.SCANCODE.EIGHT;
Keyboard.aKeyCodes[Keyboard.ASCII['*']] = Keyboard.SCANCODE.EIGHT | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['*']] = Keyboard.SCANCODE.EIGHT | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['9']] = Keyboard.SCANCODE.NINE;
Keyboard.aKeyCodes[Keyboard.ASCII['(']] = Keyboard.SCANCODE.NINE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['(']] = Keyboard.SCANCODE.NINE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['0']] = Keyboard.SCANCODE.ZERO;
Keyboard.aKeyCodes[Keyboard.ASCII[')']] = Keyboard.SCANCODE.ZERO | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII[')']] = Keyboard.SCANCODE.ZERO | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['-']] = Keyboard.SCANCODE.DASH;
Keyboard.aKeyCodes[Keyboard.ASCII['_']] = Keyboard.SCANCODE.DASH | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['_']] = Keyboard.SCANCODE.DASH | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['=']] = Keyboard.SCANCODE.EQUALS;
Keyboard.aKeyCodes[Keyboard.ASCII['+']] = Keyboard.SCANCODE.EQUALS | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.KEYCODE.BS + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.BS;
Keyboard.aKeyCodes[Keyboard.KEYCODE.TAB + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.TAB;
Keyboard.aKeyCodes[Keyboard.ASCII.q] = Keyboard.SCANCODE.Q;
Keyboard.aKeyCodes[Keyboard.ASCII.Q] = Keyboard.SCANCODE.Q | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.Q] = Keyboard.SCANCODE.Q | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.w] = Keyboard.SCANCODE.W;
Keyboard.aKeyCodes[Keyboard.ASCII.W] = Keyboard.SCANCODE.W | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.W] = Keyboard.SCANCODE.W | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.e] = Keyboard.SCANCODE.E;
Keyboard.aKeyCodes[Keyboard.ASCII.E] = Keyboard.SCANCODE.E | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.E] = Keyboard.SCANCODE.E | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.r] = Keyboard.SCANCODE.R;
Keyboard.aKeyCodes[Keyboard.ASCII.R] = Keyboard.SCANCODE.R | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.R] = Keyboard.SCANCODE.R | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.t] = Keyboard.SCANCODE.T;
Keyboard.aKeyCodes[Keyboard.ASCII.T] = Keyboard.SCANCODE.T | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.T] = Keyboard.SCANCODE.T | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.y] = Keyboard.SCANCODE.Y;
Keyboard.aKeyCodes[Keyboard.ASCII.Y] = Keyboard.SCANCODE.Y | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.Y] = Keyboard.SCANCODE.Y | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.u] = Keyboard.SCANCODE.U;
Keyboard.aKeyCodes[Keyboard.ASCII.U] = Keyboard.SCANCODE.U | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.U] = Keyboard.SCANCODE.U | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.i] = Keyboard.SCANCODE.I;
Keyboard.aKeyCodes[Keyboard.ASCII.I] = Keyboard.SCANCODE.I | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.I] = Keyboard.SCANCODE.I | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.o] = Keyboard.SCANCODE.O;
Keyboard.aKeyCodes[Keyboard.ASCII.O] = Keyboard.SCANCODE.O | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.O] = Keyboard.SCANCODE.O | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.p] = Keyboard.SCANCODE.P;
Keyboard.aKeyCodes[Keyboard.ASCII.P] = Keyboard.SCANCODE.P | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.P] = Keyboard.SCANCODE.P | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['[']] = Keyboard.SCANCODE.LBRACK;
Keyboard.aKeyCodes[Keyboard.ASCII['{']] = Keyboard.SCANCODE.LBRACK | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII[']']] = Keyboard.SCANCODE.RBRACK;
@ -605,53 +605,53 @@ Keyboard.aKeyCodes[Keyboard.ASCII['}']] = Keyboard.SCANCODE.RBRACK | (Keyboard
Keyboard.aKeyCodes[Keyboard.KEYCODE.CR] = Keyboard.SCANCODE.ENTER;
Keyboard.aKeyCodes[Keyboard.KEYCODE.CTRL + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.CTRL;
Keyboard.aKeyCodes[Keyboard.ASCII.a] = Keyboard.SCANCODE.A;
Keyboard.aKeyCodes[Keyboard.ASCII.A] = Keyboard.SCANCODE.A | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.A] = Keyboard.SCANCODE.A | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.s] = Keyboard.SCANCODE.S;
Keyboard.aKeyCodes[Keyboard.ASCII.S] = Keyboard.SCANCODE.S | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.S] = Keyboard.SCANCODE.S | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.d] = Keyboard.SCANCODE.D;
Keyboard.aKeyCodes[Keyboard.ASCII.D] = Keyboard.SCANCODE.D | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.D] = Keyboard.SCANCODE.D | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.f] = Keyboard.SCANCODE.F;
Keyboard.aKeyCodes[Keyboard.ASCII.F] = Keyboard.SCANCODE.F | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.F] = Keyboard.SCANCODE.F | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.g] = Keyboard.SCANCODE.G;
Keyboard.aKeyCodes[Keyboard.ASCII.G] = Keyboard.SCANCODE.G | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.G] = Keyboard.SCANCODE.G | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.h] = Keyboard.SCANCODE.H;
Keyboard.aKeyCodes[Keyboard.ASCII.H] = Keyboard.SCANCODE.H | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.H] = Keyboard.SCANCODE.H | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.j] = Keyboard.SCANCODE.J;
Keyboard.aKeyCodes[Keyboard.ASCII.J] = Keyboard.SCANCODE.J | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.J] = Keyboard.SCANCODE.J | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.k] = Keyboard.SCANCODE.K;
Keyboard.aKeyCodes[Keyboard.ASCII.K] = Keyboard.SCANCODE.K | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.K] = Keyboard.SCANCODE.K | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.l] = Keyboard.SCANCODE.L;
Keyboard.aKeyCodes[Keyboard.ASCII.L] = Keyboard.SCANCODE.L | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.L] = Keyboard.SCANCODE.L | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII[';']] = Keyboard.SCANCODE.SEMI;
Keyboard.aKeyCodes[Keyboard.ASCII[':']] = Keyboard.SCANCODE.SEMI | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII[':']] = Keyboard.SCANCODE.SEMI | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII["'"]] = Keyboard.SCANCODE.QUOTE;
Keyboard.aKeyCodes[Keyboard.ASCII['"']] = Keyboard.SCANCODE.QUOTE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['"']] = Keyboard.SCANCODE.QUOTE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['`']] = Keyboard.SCANCODE.BQUOTE;
Keyboard.aKeyCodes[Keyboard.ASCII['~']] = Keyboard.SCANCODE.BQUOTE | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.KEYCODE.SHIFT + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.SHIFT;
Keyboard.aKeyCodes[Keyboard.ASCII['\\']] = Keyboard.SCANCODE.BSLASH;
Keyboard.aKeyCodes[Keyboard.ASCII['|']] = Keyboard.SCANCODE.BSLASH | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.z] = Keyboard.SCANCODE.Z;
Keyboard.aKeyCodes[Keyboard.ASCII.Z] = Keyboard.SCANCODE.Z | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.Z] = Keyboard.SCANCODE.Z | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.x] = Keyboard.SCANCODE.X;
Keyboard.aKeyCodes[Keyboard.ASCII.X] = Keyboard.SCANCODE.X | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.X] = Keyboard.SCANCODE.X | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.c] = Keyboard.SCANCODE.C;
Keyboard.aKeyCodes[Keyboard.ASCII.C] = Keyboard.SCANCODE.C | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.C] = Keyboard.SCANCODE.C | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.v] = Keyboard.SCANCODE.V;
Keyboard.aKeyCodes[Keyboard.ASCII.V] = Keyboard.SCANCODE.V | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.V] = Keyboard.SCANCODE.V | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.b] = Keyboard.SCANCODE.B;
Keyboard.aKeyCodes[Keyboard.ASCII.B] = Keyboard.SCANCODE.B | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.B] = Keyboard.SCANCODE.B | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.n] = Keyboard.SCANCODE.N;
Keyboard.aKeyCodes[Keyboard.ASCII.N] = Keyboard.SCANCODE.N | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.N] = Keyboard.SCANCODE.N | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.m] = Keyboard.SCANCODE.M;
Keyboard.aKeyCodes[Keyboard.ASCII.M] = Keyboard.SCANCODE.M | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII.M] = Keyboard.SCANCODE.M | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII[',']] = Keyboard.SCANCODE.COMMA;
Keyboard.aKeyCodes[Keyboard.ASCII['<']] = Keyboard.SCANCODE.COMMA | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['<']] = Keyboard.SCANCODE.COMMA | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['.']] = Keyboard.SCANCODE.PERIOD;
Keyboard.aKeyCodes[Keyboard.ASCII['>']] = Keyboard.SCANCODE.PERIOD | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.ASCII['/']] = Keyboard.SCANCODE.SLASH;
Keyboard.aKeyCodes[Keyboard.ASCII['?']] = Keyboard.SCANCODE.SLASH | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.KEYCODE.SHIFT + Keyboard.KEYCODE.ONDOWN + Keyboard.KEYCODE.ONRIGHT] = Keyboard.SCANCODE.RSHIFT;
Keyboard.aKeyCodes[Keyboard.ASCII['?']] = Keyboard.SCANCODE.SLASH | (Keyboard.SCANCODE.SHIFT << 8);
Keyboard.aKeyCodes[Keyboard.KEYCODE.SHIFT + Keyboard.KEYCODE.ONDOWN + Keyboard.KEYCODE.ONRIGHT] = Keyboard.SCANCODE.RSHIFT;
// TODO: 0x37 ('prtsc')
Keyboard.aKeyCodes[Keyboard.KEYCODE.ALT + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.ALT;
Keyboard.aKeyCodes[Keyboard.ASCII[' ']] = Keyboard.SCANCODE.SPACE;
@ -685,13 +685,13 @@ Keyboard.aKeyCodes[Keyboard.KEYCODE.DEL + Keyboard.KEYCODE.ONDOWN] = Keyboard
* clones that could use newer keyboards, as well as 3rd-party keyboards that could work with older machines,
* support for non-IBM configurations is left for another day.
*
* TODO: The only relevance of newer keyboards to older machines is the fact that you're likely using a newer
* TODO: The only relevance of newer keyboards to older machines is the fact that you're probably using a newer
* keyboard with your browser, which raises the question of what to do with newer keys that older machines
* wouldn't understand. I don't attempt to filter out any of the entries below based on machine model, but
* it's likely that I should.
* wouldn't understand. I don't attempt to filter out any of the entries below based on machine model, but that
* would seem like a wise thing to do.
*
* TODO: Add entries for 'num-mul', 'num-div', 'num-enter', the stand-alone arrow keys, etc, AND at
* the same time, add support for multi-byte codes (eg, 0xe01c).
* TODO: Add entries for 'num-mul', 'num-div', 'num-enter', the stand-alone arrow keys, etc, AND at the same time,
* make sure that keys with multi-byte sequences (eg, 0xe0 0x1c) work properly.
*/
Keyboard.aKeyCodes[Keyboard.KEYCODE.F11 + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.F11;
Keyboard.aKeyCodes[Keyboard.KEYCODE.F12 + Keyboard.KEYCODE.ONDOWN] = Keyboard.SCANCODE.F12;

View file

@ -413,6 +413,7 @@ function embedMachine(sName, sVersion, idElement, sXMLFile, sXSLFile, sStateFile
*/
function embedC1P(idElement, sXMLFile, sXSLFile)
{
if (fAsync) web.enablePageEvents(false);
return embedMachine("C1Pjs", APPVERSION, idElement, sXMLFile, sXSLFile);
}
@ -427,6 +428,7 @@ function embedC1P(idElement, sXMLFile, sXSLFile)
*/
function embedPC(idElement, sXMLFile, sXSLFile, sStateFile)
{
if (fAsync) web.enablePageEvents(false);
return embedMachine("PCjs", APPVERSION, idElement, sXMLFile, sXSLFile, sStateFile);
}
@ -444,5 +446,3 @@ if (APPNAME == "C1Pjs") {
window['enableEvents'] = web.enablePageEvents;
window['sendEvent'] = web.sendPageEvent;
if (fAsync) web.enablePageEvents(false);

View file

@ -167,4 +167,4 @@ function sb(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],h);sb(a,b,c)}})}else c(a,null)}
function tb(a,b,c){function d(a){if(void 0===k){var b=h&&F(h,"machine-warning");k=b&&b[0]||h}k&&(k.innerHTML=da(a))}function e(a){d("Error: "+a);l&&g();l=!1}function g(){0==--pb&&ia(!0)}var h,k,l=!0;pb++;try{if(h=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.15.9/components.xsl");var m=function(a,k){if(k){var l=function(a,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=k.transformNode(l);m?(h.outerHTML=m,g()):e("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(l),(m=m.transformToFragment(k,window.document))?(h.parentNode.replaceChild(m,h),g()):e("transformToFragment failed")):e("unable to transform XML: unsupported browser");else e("failed to load XSL file: "+c);else e(a)};k?qb(c,null,null,!1,d,l):e("failed to load XML file: "+b)}else e(a)};"<"!=b.charAt(0)?qb(b,a,void 0,!0,d,m):rb(b,null,a,void 0,!1,d,m)}else e("failed to find machine element: "+a)}catch(q){e(q.message)}return l}
window.embedC1P=function(a,b,c){return tb(a,b,c)};window.enableEvents=ia;window.sendEvent=ja;ia(!1);})();
window.embedC1P=function(a,b,c){ia(!1);return tb(a,b,c)};window.enableEvents=ia;window.sendEvent=ja;})();

View file

@ -127,4 +127,4 @@ function Ta(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var f=
"");a=a.replace(d[0],k);Ta(a,b,c)}})}else c(a,null)}
function Ua(a,b,c){function d(a){if(void 0===h){var b=k&&I(k,"machine-warning");h=b&&b[0]||k}h&&(h.innerHTML=ca(a))}function f(a){d("Error: "+a);l&&g();l=!1}function g(){0==--Qa&&y(!0)}var k,h,l=!0;Qa++;try{if(k=window.document.getElementById(a)){c||(c="/versions/c1pjs/1.15.9/components.xsl");var m=function(a,h){if(h){var l=function(a,l){if(l)if(l)if(d("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var m=h.transformNode(l);m?(k.outerHTML=m,g()):f("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(m=new XSLTProcessor,m.importStylesheet(l),(m=m.transformToFragment(h,window.document))?(k.parentNode.replaceChild(m,k),g()):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f("failed to load XSL file: "+c);else f(a)};h?Ra(c,null,null,!1,d,l):f("failed to load XML file: "+b)}else f(a)};"<"!=b.charAt(0)?Ra(b,a,void 0,!0,d,m):Sa(b,null,a,void 0,!1,d,m)}else f("failed to find machine element: "+a)}catch(n){f(n.message)}return l}
window.embedC1P=function(a,b,c){return Ua(a,b,c)};window.enableEvents=y;window.sendEvent=ea;y(!1);})();
window.embedC1P=function(a,b,c){y(!1);return Ua(a,b,c)};window.enableEvents=y;window.sendEvent=ea;})();

View file

@ -758,4 +758,4 @@ function Rm(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],g);Rm(a,b,c)}})}else c(a,null)}
function Sm(a,b,c,d){function e(a){if(void 0===l){var b=h&&D(h,"machine-warning");l=b&&b[0]||h}l&&(l.innerHTML=ja(a))}function f(a){e("Error: "+a);n&&g();n=!1}function g(){0==--Lm&&Ja(!0)}var h,l,n=!0;Lm++;try{if(h=window.document.getElementById(a)){c||(c="/versions/pcjs/1.15.9/components.xsl");var q=function(a,d){if(d){var l=function(a,l){if(l)if(l)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var n=d.transformNode(l);n?(h.outerHTML=n,g()):f("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(n=new XSLTProcessor,n.importStylesheet(l),(n=n.transformToFragment(d,window.document))?(h.parentNode.replaceChild(n,h),g()):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f("failed to load XSL file: "+c);else f(a)};d?Mm(c,null,null,!1,e,l):f("failed to load XML file: "+b)}else f(a)};"<"!=b.charAt(0)?Mm(b,a,d,!0,e,q):Nm(b,null,a,d,!1,e,q)}else f("failed to find machine element: "+a)}catch(r){f(r.message)}return n}
window.embedPC=function(a,b,c,d){return Sm(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;Ja(!1);})();
window.embedPC=function(a,b,c,d){Ja(!1);return Sm(a,b,c,d)};window.enableEvents=Ja;window.sendEvent=Ka;})();

View file

@ -644,4 +644,4 @@ function Bk(a,b,c){var d;if(d=/<([a-z]+)\s+ref="(.*?)"(.*?)\/>/g.exec(a)){var e=
"");a=a.replace(d[0],h);Bk(a,b,c)}})}else c(a,null)}
function Ck(a,b,c,d){function e(a){if(void 0===m){var b=g&&A(g,"machine-warning");m=b&&b[0]||g}m&&(m.innerHTML=ga(a))}function f(a){e("Error: "+a);n&&h();n=!1}function h(){0==--yk&&ya(!0)}var g,m,n=!0;yk++;try{if(g=window.document.getElementById(a)){c||(c="/versions/pcjs/1.15.9/components.xsl");var q=function(a,d){if(d){var m=function(a,m){if(m)if(m)if(e("Processing "+b+"..."),window.ActiveXObject||"ActiveXObject"in window){var n=d.transformNode(m);n?(g.outerHTML=n,h()):f("transformNodeToObject failed")}else window.document.implementation&&
window.document.implementation.createDocument?(n=new XSLTProcessor,n.importStylesheet(m),(n=n.transformToFragment(d,window.document))?(g.parentNode.replaceChild(n,g),h()):f("transformToFragment failed")):f("unable to transform XML: unsupported browser");else f("failed to load XSL file: "+c);else f(a)};d?zk(c,null,null,!1,e,m):f("failed to load XML file: "+b)}else f(a)};"<"!=b.charAt(0)?zk(b,a,d,!0,e,q):Ak(b,null,a,d,!1,e,q)}else f("failed to find machine element: "+a)}catch(w){f(w.message)}return n}
window.embedPC=function(a,b,c,d){return Ck(a,b,c,d)};window.enableEvents=ya;window.sendEvent=za;ya(!1);})();
window.embedPC=function(a,b,c,d){ya(!1);return Ck(a,b,c,d)};window.enableEvents=ya;window.sendEvent=za;})();