Fixed soft key processing for PC8080 (to fix an issue with the Epiphany browser on the elementary OS involving the VT100 SET-UP button)
This commit is contained in:
parent
8f734ef857
commit
342f976e42
10 changed files with 170 additions and 146 deletions
|
|
@ -497,7 +497,7 @@ Y[p["9"]]=10;Y[p["("]]=10762;Y[p["0"]]=11;Y[p[")"]]=10763;Y[p["-"]]=12;Y[p._]=10
|
|||
Y[p.d]=32;Y[p.Di]=10784;Y[p.Cl]=33;Y[p.Ei]=10785;Y[p.Dl]=34;Y[p.Fi]=10786;Y[p.El]=35;Y[p.Gi]=10787;Y[p.Vm]=36;Y[p.Ii]=10788;Y[p.k]=37;Y[p.Ji]=10789;Y[p.Wm]=38;Y[p.Ki]=10790;Y[p[";"]]=39;Y[p[":"]]=10791;Y[p["'"]]=40;Y[p['"']]=10792;Y[p["`"]]=41;Y[p["~"]]=10793;Y[1016]=42;Y[p["\\"]]=43;Y[p["|"]]=10795;Y[p.z]=44;Y[p.og]=10796;Y[p.x]=45;Y[p.Vi]=10797;Y[p.sl]=46;Y[p.Ci]=10798;Y[p.ro]=47;Y[p.Ti]=10799;Y[p.ql]=48;Y[p.Bi]=10800;Y[p.n]=49;Y[p.Mi]=10801;Y[p.$m]=50;Y[p.Li]=10802;Y[p[","]]=51;Y[p["<"]]=10803;
|
||||
Y[p["."]]=52;Y[p[">"]]=10804;Y[p["/"]]=53;Y[p["?"]]=10805;Y[3016]=54;Y[1044]=55;Y[1018]=56;Y[1032]=57;Y[1020]=58;Y[1112]=59;Y[1113]=60;Y[1114]=61;Y[1115]=62;Y[1116]=63;Y[1117]=64;Y[1118]=65;Y[1119]=66;Y[1120]=67;Y[1121]=68;Y[1144]=69;Y[1145]=70;Y[1036]=71;Y[1038]=72;Y[1033]=73;Y[1109]=74;Y[1037]=75;Y[1101]=76;Y[1039]=77;Y[1107]=78;Y[1035]=79;Y[1040]=80;Y[1034]=81;Y[1045]=82;Y[1046]=83;Y[4027]=84;Y[1122]=87;Y[1123]=88;Y[1091]=91;Y[1093]=93;Y[1224]=91;Y[tm]=7470;Y[4008]=7494;Y[4046]=3677523;
|
||||
Y[4045]=3677522;Y[4013]=3677468;l=qm.prototype;
|
||||
l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]=
|
||||
l.Pb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.qa[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return ym(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.L="";var b=!Y[a]||!!(e.xc&128);b||zm(e,a,!0);return b},c.onkeyup=function(a){return ym(e,a,!1)},!0;case "caps-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1020,!0)},!0;case "num-lock":return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();zm(e,1144,!0)},!0;case "scroll-lock":return this.qa[f]=
|
||||
c,c.onclick=function(){e.X&&e.X.wd();zm(e,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==vm[g]&&"button"==a)return this.qa[f]=c,c.onclick=function(a,b,c){return function(){a.X&&a.X.wd();Am(a,c,!0);zm(a,c,!0)}}(this,g,vm[g]),!0;if(void 0!==wm[b])return this.fa++,this.qa[f]=c,a=function(a,b,c){return function(){zm(a,c)}}(this,b,wm[b]),b=function(a,b,c){return function(){Bm(a,c)}}(this,b,wm[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=
|
||||
c.onmouseout=b),!0;if(d)return this.qa[f]=c,c.onclick=function(){e.X&&e.X.wd();d&&!e.L&&(e.L=d,Cm(e,300))},!0}return!1};function Dm(a,b,c){if(a.fa){for(var d in da)if(b==da[d]){b=+d;(d=ca[d])&&(b=d);break}for(var e in wm)if((d=wm[e]==b)||(d=b,d>=p.ve&&d<=p.z&&(d-=p.ve-p.ue),d=wm[e]==d),d){(a=a.qa["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.Jc=function(a,b,c,d){this.X=a;this.ga=b;this.F=c;this.ha=d;this.N=Jb(a,"ChipSet")};
|
||||
function rm(a,b){var c=0;a.ja=null;"string"==typeof b&&(a.ja=b.toUpperCase(),c=sm.indexOf(a.ja),0>c&&(c=0));if(b=sm[c])a.ra=parseInt(b.substr(2),10)}function Xl(a){y(a,"keyboard reset",65792);a.A=[];Yl(a,170)}function Tl(a,b,c){a.aa!==c&&(a.aa=a.ea=c)&&(a.U=!0);a.W!==b&&(a.W=b)&&!a.ea&&am(a,!0);a.W&&a.ea&&(Xl(a),a.ea=!1)}function Yl(a,b){a.N&&(a.A.unshift(b),a.U=!0,$l(a.N,b))}
|
||||
|
|
@ -544,7 +544,7 @@ l=Z.prototype;
|
|||
l.Jc=function(a,b,c,d){this.ga=b;this.F=c;this.ha=d;c=(c=Im[this.ja])&&c[0];3!==c&&(qc(b,this,ln),yc(b,this,mn));1!==c&&(qc(b,this,nn),yc(b,this,on));5<=this.Ua&&(qc(b,this,pn),yc(b,this,qn));this.Ua==hm&&(qc(b,this,rn),yc(b,this,sn));if(d){var e=this;Qk(d,262144,function(a){if(e.C)if(a[0]){var b=e.C;if(b.rd){var c,d,f,g=!1,q=8,A=8,F=-1,C=b.video.L>>3;for(c=0;c<a.length;c++){var D=a[c];if(c){var L=D.charAt(0);d=ea(D.substr(1),16);switch(L){case "l":q=d;break;case "n":1<=d&&8>=d&&(A=d,g=!0);break;
|
||||
case "p":0<=d&&3>=d&&(F=d);break;case "w":d<C&&(C=d);break;default:b.ha.O("unrecognized argument: "+D)}}else f=ea(D,16)}void 0===f?f=b.B||0:f>=b.ob&&(f-=b.ob);a="";for(c=0;c<q;c++){D=r(b.ob+f)+":";for(d=0;d<A&&f<b.rd.length;d++)L=b.rd[f++],D+=" "+(0>F?r(L):fa(L>>(F<<3),8));g&&(f+=C-A);a&&(a+="\n");a+=D}a&&b.ha.O(a);b.B=f}else b.ha.O("no buffer")}else e.ha.O("BIOSMODE: "+u(e.Ga)),b=e.C,jn(b,"CRTC",b.Ac,b.mb,b.qg),5<=b.Ua&&(jn(b," GRC",b.$d,b.Zd,b.ah),jn(b," SEQ",b.ae,b.Me,b.bh),jn(b," ATC",b.Nd,b.Tc,
|
||||
b.$g),jn(b," ATCINDX",b.Nd),b.ha.O(" ATCDATA: "+b.Ze),jn(b," FEAT",b.ig),jn(b," MISC",b.vf),jn(b," STATUS0",b.Tg)),jn(b," STATUS1",b.ma),1!=b.Ua&&3!=b.Ua||jn(b," MODEREG",b.gd),3==b.Ua&&jn(b," COLOR",b.tf),5<=b.Ua&&(b.ha.O(" LATCHES: "+r(b.Fb)),b.ha.O(" ACCESS: "+r(b.Dg,4)),b.ha.O("Use 'dump video [addr]' to dump video memory"));else e.ha.O("no active video card")})}if((this.B=Jb(a,"Keyboard"))&&this.ka){for(var f in this.qa)0<f.indexOf("lock")&&this.B.Pb("led",f,this.qa[f]);this.B.Pb(this.cl?
|
||||
"textarea":"canvas","kbd",this.X)}this.Wc=9;(this.N=Jb(a,"ChipSet"))&&this.fg&&5==this.Ua&&(this.Wc=wk(this.fg,this.Wc));"mouse"==this.lg?(this.V=Jb(a,"Mouse"))&&tn(this,2):"keygrid"==this.lg&&this.B&&tn(this,1)};
|
||||
"textarea":"canvas","screen",this.X)}this.Wc=9;(this.N=Jb(a,"ChipSet"))&&this.fg&&5==this.Ua&&(this.Wc=wk(this.fg,this.Wc));"mouse"==this.lg?(this.V=Jb(a,"Mouse"))&&tn(this,2):"keygrid"==this.lg&&this.B&&tn(this,1)};
|
||||
l.Pb=function(a,b,c){var d=this;if(!this.qa[b])switch(this.qa[b]=c,b){case "fullScreen":return this.ia&&this.ia.Ye?c.onclick=function(){d.Ye()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.bl=c.textContent,this.X&&this.X.Fe?c.onclick=function(){d.Fe(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){un(d,!0)},!0}return!1};
|
||||
l.Ye=function(){var a=!1;if(this.ia){if(this.ia.Ye){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.ra/this.Da;b>c&&(a=Math.round(c/b*100)+"%")}this.rf?(this.ka.style.width=a,this.ka.style.width=a,this.ka.style.display="block",this.ka.style.margin="auto"):(this.ia.style.width=a,this.ia.style.height="auto");this.ia.style.backgroundColor="black";this.ia.Ye();a=!0}this.X&&this.X.focus()}return a};
|
||||
function Lm(a,b){!b&&a.ia&&(a.rf?a.ka.style.width=a.ka.style.height="":a.ia.style.width=a.ia.style.height="");y(a,"notifyFullScreen("+b+")",!0);a.B&&(a.B.kh=b)}l.Fe=function(a){var b=!1;this.X&&(a?this.X.Fe&&(this.X.Fe(),this.V&&this.V.Zf(!0),b=!0):this.X.$k&&(this.X.$k(),this.V&&this.V.Zf(!1),b=!0),this.X&&this.X.focus());return b};l.Zf=function(a){this.V&&(this.V.Zf(a),this.B&&(this.B.kh=a));var b=this.qa.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.bl)};
|
||||
|
|
|
|||
Loading…
Reference in a new issue