spiegel-keyman/common/test/resources/keyboards/test_rtl.js
Eberhard Beilharz 933361a520
feat(web): add and use RTL test keyboard
Build-bot: skip:all, build:web
Test-bot: skip
2026-01-29 14:52:56 +01:00

48 lines
1.2 KiB
JavaScript

if(typeof keyman === 'undefined') {
console.log('Keyboard requires KeymanWeb 10.0 or later');
if(typeof tavultesoft !== 'undefined') tavultesoft.keymanweb.util.alert("This keyboard requires KeymanWeb 10.0 or later");
} else {
KeymanWeb.KR(new Keyboard_test_rtl());
}
function Keyboard_test_rtl()
{
var modCodes = keyman.osk.modifierCodes;
var keyCodes = keyman.osk.keyCodes;
this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;
this.KI="Keyboard_test_rtl";
this.KN ="RTL Keyboard";
this.KMINVER="10.0";
this.KV=null;
this.KDU=0;
this.KH='';
this.KM=0;
this.KBVER="1.0";
this.KMBM=0 /* 0x0000 */;
this.KRTL=1;
this.KVS=[];
this.gs=function(t,e) {
return this.g_Main_0(t,e);
};
this.gs=function(t,e) {
return this.g_Main_0(t,e);
};
this.g_Main_0=function(t,e) {
var k=KeymanWeb,r=0,m=0;
if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) {
if(1){
r=m=1; // Line 10
k.KDC(0,t);
k.KO(-1,t,"ش");
}
}
else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) {
if(1){
r=m=1; // Line 11
k.KDC(0,t);
k.KO(-1,t,"ال");
}
}
return r;
};
}