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)};
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ X[n["9"]]=10;X[n["("]]=10762;X[n["0"]]=11;X[n[")"]]=10763;X[n["-"]]=12;X[n._]=10
|
|||
X[n.d]=32;X[n.yh]=10784;X[n.pk]=33;X[n.zh]=10785;X[n.qk]=34;X[n.Ah]=10786;X[n.rk]=35;X[n.Bh]=10787;X[n.Dl]=36;X[n.Dh]=10788;X[n.k]=37;X[n.Eh]=10789;X[n.El]=38;X[n.Fh]=10790;X[n[";"]]=39;X[n[":"]]=10791;X[n["'"]]=40;X[n['"']]=10792;X[n["`"]]=41;X[n["~"]]=10793;X[1016]=42;X[n["\\"]]=43;X[n["|"]]=10795;X[n.z]=44;X[n.vf]=10796;X[n.x]=45;X[n.ai]=10797;X[n.ek]=46;X[n.xh]=10798;X[n.Sm]=47;X[n.Xh]=10799;X[n.dk]=48;X[n.wh]=10800;X[n.n]=49;X[n.Ih]=10801;X[n.Hl]=50;X[n.Gh]=10802;X[n[","]]=51;X[n["<"]]=10803;
|
||||
X[n["."]]=52;X[n[">"]]=10804;X[n["/"]]=53;X[n["?"]]=10805;X[3016]=54;X[1044]=55;X[1018]=56;X[1032]=57;X[1020]=58;X[1112]=59;X[1113]=60;X[1114]=61;X[1115]=62;X[1116]=63;X[1117]=64;X[1118]=65;X[1119]=66;X[1120]=67;X[1121]=68;X[1144]=69;X[1145]=70;X[1036]=71;X[1038]=72;X[1033]=73;X[1109]=74;X[1037]=75;X[1101]=76;X[1039]=77;X[1107]=78;X[1035]=79;X[1040]=80;X[1034]=81;X[1045]=82;X[1046]=83;X[4027]=84;X[1122]=87;X[1123]=88;X[1091]=91;X[1093]=93;X[1224]=91;X[tk]=7470;X[4008]=7494;X[4046]=3677523;
|
||||
X[4045]=3677522;X[4013]=3677468;l=qk.prototype;
|
||||
l.zb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.la[f])switch(b){case "kbd":return c.onkeydown=function(a){return yk(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.D="";var b=!X[a]||!!(e.bc&128);b||zk(e,a,!0);return b},c.onkeyup=function(a){return yk(e,a,!1)},!0;case "caps-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1020,!0)},!0;case "num-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1144,!0)},!0;case "scroll-lock":return this.la[f]=
|
||||
l.zb=function(a,b,c,d){var e=this,f=a+"-"+b;if(void 0===this.la[f])switch(b){case "kbd":case "screen":return c.onkeydown=function(a){return yk(e,a,!0)},c.onkeypress=function(a){a=a||window.event;a=a.which||a.keyCode;e.D="";var b=!X[a]||!!(e.bc&128);b||zk(e,a,!0);return b},c.onkeyup=function(a){return yk(e,a,!1)},!0;case "caps-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1020,!0)},!0;case "num-lock":return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1144,!0)},!0;case "scroll-lock":return this.la[f]=
|
||||
c,c.onclick=function(){e.ba&&xc(e.ba);zk(e,1145,!0)},!0;default:var g=b.toUpperCase().replace(/-/g,"_");if(void 0!==vk[g]&&"button"==a)return this.la[f]=c,c.onclick=function(a,b,c){return function(){a.ba&&xc(a.ba);Ak(a,c,!0);zk(a,c,!0)}}(this,g,vk[g]),!0;if(void 0!==wk[b])return this.R++,this.la[f]=c,a=function(a,b,c){return function(){zk(a,c)}}(this,b,wk[b]),b=function(a,b,c){return function(){Bk(a,c)}}(this,b,wk[b]),"ontouchstart"in window?(c.ontouchstart=a,c.ontouchend=b):(c.onmousedown=a,c.onmouseup=
|
||||
c.onmouseout=b),!0;if(d)return this.la[f]=c,c.onclick=function(){e.ba&&xc(e.ba);d&&!e.D&&(e.D=d,Ck(e,300))},!0}return!1};function Dk(a,b,c){if(a.R){for(var d in p)if(b==p[d]){b=+d;(d=da[d])&&(b=d);break}for(var e in wk)if((d=wk[e]==b)||(d=b,d>=n.Md&&d<=n.z&&(d-=n.Md-n.Kd),d=wk[e]==d),d){(a=a.la["key-"+e])&&void 0!==c&&(a.style.color=c?"#ffffff":"#000000",a.style.backgroundColor=c?"#000000":"#ffffff");break}}}l.pc=function(a,b,c,d){this.ba=a;this.ia=b;this.A=c;this.Ia=d;this.S=mb(a,"ChipSet")};
|
||||
function rk(a,b){var c=0;a.ca=null;"string"==typeof b&&(a.ca=b.toUpperCase(),c=sk.indexOf(a.ca),0>c&&(c=0));if(b=sk[c])a.Z=parseInt(b.substr(2),10)}function Vj(a,b,c){a.K!==c&&(a.K=a.L=c)&&(a.H=!0);a.I!==b&&(a.I=b)&&!a.L&&ck(a,!0);a.I&&a.L&&(a.Pb=[],Zj(a,170),a.L=!1)}function Zj(a,b){a.S&&(a.Pb.unshift(b),a.H=!0,bk(a.S,b))}function Wj(a){var b;a.Pb.length&&a.H&&(b=a.Pb[0],a.S&&bk(a.S,b))}function Tj(a){var b=0;a.Pb.length&&(b=a.Pb[0]);return b}
|
||||
|
|
@ -510,7 +510,7 @@ c[16]=a.lh;c[17]=a.$a;c[18]=a.Hc;c[19]=a.tb;c[20]=a.df;c[21]=a.md;c[22]=a.Dd;c[2
|
|||
Xk.prototype.$f=function(a){if(null!=a&&a!=this.ug){var b=a&65280,c=bl[b];c||b&4096&&(c=bl[4096]);var b=a&255,d=bl[b];d||b&16&&(d=bl[16]);this.A||(this.A=Array(6));this.A[0]=c;this.A[1]=d;this.ug=a}};
|
||||
function dl(a,b){var c=a.ab[b];if(null!=c&&5<=a.Ra){var d=0,e=0,f=0;switch(b){case 6:d=1;a.Ra==hk&&(e=32);break;case 10:5==a.Ra&&(d=32);break;case 16:d=4;a.Ra==hk&&(e=128);break;case 18:d=2;a.Ra==hk&&(e=64);break;case 21:d=8;a.Ra==hk&&(f=32);break;case 24:d=16,a.Ra==hk&&(f=64)}d&&(c|=a.ab[7]&d?256:0,c|=a.ab[7]&e?512:0,c|=a.ab[9]&f?512:0)}return c}var Yk=[,["MDA",948,720896,4096,0,3],,["CGA",980,753664,16384,0,2],,["EGA",980,753664,16384,65536,4]];Yk[hk]=["VGA",980,753664,16384,262144,7];var Kk=0;
|
||||
l=Y.prototype;
|
||||
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;c=(c=Ik[this.ca])&&c[0];3!==c&&(Sb(b,this,el),Ub(b,this,fl));1!==c&&(Sb(b,this,gl),Ub(b,this,hl));5<=this.Ra&&(Sb(b,this,il),Ub(b,this,jl));this.Ra==hk&&(Sb(b,this,kl),Ub(b,this,ll));if((this.C=mb(a,"Keyboard"))&&this.Y){for(var e in this.la)0<e.indexOf("lock")&&this.C.zb("led",e,this.la[e]);this.C.zb(this.ce?"textarea":"canvas","kbd",this.G)}this.Bb=9;(this.S=mb(a,"ChipSet"))&&this.pd&&5==this.Ra&&(this.Bb=Di(this.pd,this.Bb));"mouse"==this.qd?
|
||||
l.pc=function(a,b,c,d){this.ia=b;this.A=c;this.Ia=d;c=(c=Ik[this.ca])&&c[0];3!==c&&(Sb(b,this,el),Ub(b,this,fl));1!==c&&(Sb(b,this,gl),Ub(b,this,hl));5<=this.Ra&&(Sb(b,this,il),Ub(b,this,jl));this.Ra==hk&&(Sb(b,this,kl),Ub(b,this,ll));if((this.C=mb(a,"Keyboard"))&&this.Y){for(var e in this.la)0<e.indexOf("lock")&&this.C.zb("led",e,this.la[e]);this.C.zb(this.ce?"textarea":"canvas","screen",this.G)}this.Bb=9;(this.S=mb(a,"ChipSet"))&&this.pd&&5==this.Ra&&(this.Bb=Di(this.pd,this.Bb));"mouse"==this.qd?
|
||||
(this.P=mb(a,"Mouse"))&&ml(this,2):"keygrid"==this.qd&&this.C&&ml(this,1)};l.zb=function(a,b,c){var d=this;if(!this.la[b])switch(this.la[b]=c,b){case "fullScreen":return this.W&&this.W.me?c.onclick=function(){d.me()}:c.parentNode.removeChild(c),!0;case "lockPointer":return this.Ld=c.textContent,this.G&&this.G.Rd?c.onclick=function(){d.Rd(!0)}:c.parentNode.removeChild(c),!0;case "refresh":return c.onclick=function(){nl(d,!0)},!0}return!1};
|
||||
l.me=function(){var a=!1;if(this.W){if(this.W.me){a="100%";if(screen&&screen.width&&screen.height){var b=screen.width/screen.height,c=this.da/this.pa;b>c&&(a=Math.round(c/b*100)+"%")}this.bd?(this.Y.style.width=a,this.Y.style.width=a,this.Y.style.display="block",this.Y.style.margin="auto"):(this.W.style.width=a,this.W.style.height="auto");this.W.style.backgroundColor="black";this.W.me();a=!0}this.G&&this.G.focus()}return a};
|
||||
function Lk(a,b){!b&&a.W&&(a.bd?a.Y.style.width=a.Y.style.height="":a.W.style.width=a.W.style.height="");a.C&&(a.C.og=b)}l.Rd=function(a){var b=!1;this.G&&(a?this.G.Rd&&(this.G.Rd(),this.P&&this.P.ef(!0),b=!0):this.G.Rj&&(this.G.Rj(),this.P&&this.P.ef(!1),b=!0),this.G&&this.G.focus());return b};l.ef=function(a){this.P&&(this.P.ef(a),this.C&&(this.C.og=a));var b=this.la.lockPointer;b&&(b.textContent=a?"Press Esc to Unlock Pointer":this.Ld)};
|
||||
|
|
|
|||
Loading…
Reference in a new issue