diff --git a/common/test/keyboards/baseline/README.md b/common/test/keyboards/baseline/README.md index cede107085..7894490d9b 100644 --- a/common/test/keyboards/baseline/README.md +++ b/common/test/keyboards/baseline/README.md @@ -4,11 +4,13 @@ This folder contains a set of keyboards that are used by multiple projects to verify behaviour, both for compilation, and for runtime tests. The following projects are known to use these keyboards: + * core -- .kmn files only, compiled with kmc during tests * developer/kmcmplib -- .kmn files, compiled for tests, and .kmx as reference * linux -- .kmn files for test steps only, .kmx files +* web -- .kmn files for test steps, .kmx and .js files -The .kmx files were built with kmcomp, not kmc, in order to ensure that +The .kmx and .js files were built with kmcomp, not kmc, in order to ensure that developer/kmcmplib gets a valid baseline reference. Once kmc is stable, it is possible that we will be able to use the kmc npm @@ -16,9 +18,11 @@ module to build .kmx for all projects that need them. ## Build parameters -Keyboards were built with debug information and no compiler version embedded, -with kmcomp 16.0.138: +The keyboards can be built with: -```bat -for %d in (*.kmn) do kmcomp -no-compiler-version -d %d +```bash +./build.sh build ``` + +This builds the keyboards with debug information and no compiler version +embedded. diff --git a/common/test/keyboards/baseline/baseline.kpj b/common/test/keyboards/baseline/baseline.kpj index 3ce7e9b83c..5e7c461aac 100644 --- a/common/test/keyboards/baseline/baseline.kpj +++ b/common/test/keyboards/baseline/baseline.kpj @@ -9,324 +9,324 @@ - id_k_000___null_keyboard - k_000___null_keyboard.kmn - k_000___null_keyboard.kmn + id_k_0000___null_keyboard + k_0000___null_keyboard.kmn + k_0000___null_keyboard.kmn 1.0 .kmn - id_k_001___basic_input_unicodei - k_001___basic_input_unicodei.kmn - k_001___basic_input_unicodei.kmn + id_k_0100___basic_input_unicodei + k_0100___basic_input_unicodei.kmn + k_0100___basic_input_unicodei.kmn 1.0 .kmn - id_k_002___basic_input_unicode - k_002___basic_input_unicode.kmn - k_002___basic_input_unicode.kmn + id_k_0101___basic_input_unicode + k_0101___basic_input_unicode.kmn + k_0101___basic_input_unicode.kmn 1.0 .kmn - id_k_003___nul - k_003___nul.kmn - k_003___nul.kmn + id_k_0001___nul + k_0001___nul.kmn + k_0001___nul.kmn 1.0 .kmn - id_k_004___basic_input__shift_2_ - k_004___basic_input__shift_2_.kmn - k_004___basic_input__shift_2_.kmn + id_k_0102___basic_input__shift_2_ + k_0102___basic_input__shift_2_.kmn + k_0102___basic_input__shift_2_.kmn 1.0 .kmn - id_k_005___nul_with_initial_context - k_005___nul_with_initial_context.kmn - k_005___nul_with_initial_context.kmn + id_k_0002___nul_with_initial_context + k_0002___nul_with_initial_context.kmn + k_0002___nul_with_initial_context.kmn 1.0 .kmn - id_k_006___vkey_input__shift_ctrl_ - k_006___vkey_input__shift_ctrl_.kmn - k_006___vkey_input__shift_ctrl_.kmn + id_k_0103___vkey_input__shift_ctrl_ + k_0103___vkey_input__shift_ctrl_.kmn + k_0103___vkey_input__shift_ctrl_.kmn 1.0 .kmn - id_k_007___vkey_input__ctrl_alt_ - k_007___vkey_input__ctrl_alt_.kmn - k_007___vkey_input__ctrl_alt_.kmn + id_k_0104___vkey_input__ctrl_alt_ + k_0104___vkey_input__ctrl_alt_.kmn + k_0104___vkey_input__ctrl_alt_.kmn 1.0 .kmn - id_k_008___vkey_input__ctrl_alt_2_ - k_008___vkey_input__ctrl_alt_2_.kmn - k_008___vkey_input__ctrl_alt_2_.kmn + id_k_0105___vkey_input__ctrl_alt_2_ + k_0105___vkey_input__ctrl_alt_2_.kmn + k_0105___vkey_input__ctrl_alt_2_.kmn 1.0 .kmn - id_k_012___ralt - k_012___ralt.kmn - k_012___ralt.kmn + id_k_0200___ralt + k_0200___ralt.kmn + k_0200___ralt.kmn 1.0 .kmn - id_k_013___deadkeys - k_013___deadkeys.kmn - k_013___deadkeys.kmn + id_k_0300___deadkeys + k_0300___deadkeys.kmn + k_0300___deadkeys.kmn 1.0 .kmn - id_k_014___groups_and_virtual_keys - k_014___groups_and_virtual_keys.kmn - k_014___groups_and_virtual_keys.kmn + id_k_0400___groups_and_virtual_keys + k_0400___groups_and_virtual_keys.kmn + k_0400___groups_and_virtual_keys.kmn 1.0 .kmn - id_k_015___ralt_2 - k_015___ralt_2.kmn - k_015___ralt_2.kmn + id_k_0201___ralt_2 + k_0201___ralt_2.kmn + k_0201___ralt_2.kmn 1.0 .kmn - id_k_017___space_mnemonic_kbd - k_017___space_mnemonic_kbd.kmn - k_017___space_mnemonic_kbd.kmn + id_k_0004___space_mnemonic_kbd + k_0004___space_mnemonic_kbd.kmn + k_0004___space_mnemonic_kbd.kmn 1.0 .kmn - id_k_018___nul_testing - k_018___nul_testing.kmn - k_018___nul_testing.kmn + id_k_0003___nul_testing + k_0003___nul_testing.kmn + k_0003___nul_testing.kmn 1.0 .kmn - id_k_019___multiple_deadkeys - k_019___multiple_deadkeys.kmn - k_019___multiple_deadkeys.kmn + id_k_0301___multiple_deadkeys + k_0301___multiple_deadkeys.kmn + k_0301___multiple_deadkeys.kmn 1.0 .kmn - id_k_020___deadkeys_and_backspace - k_020___deadkeys_and_backspace.kmn - k_020___deadkeys_and_backspace.kmn + id_k_0302___deadkeys_and_backspace + k_0302___deadkeys_and_backspace.kmn + k_0302___deadkeys_and_backspace.kmn 1.0 .kmn - id_k_021___options - k_021___options.kmn - k_021___options.kmn + id_k_0500___options + k_0500___options.kmn + k_0500___options.kmn 1.0 .kmn - id_k_022___options_with_preset - k_022___options_with_preset.kmn - k_022___options_with_preset.kmn + id_k_0501___options_with_preset + k_0501___options_with_preset.kmn + k_0501___options_with_preset.kmn 1.0 .kmn - id_k_023___options_with_save - k_023___options_with_save.kmn - k_023___options_with_save.kmn + id_k_0502___options_with_save + k_0502___options_with_save.kmn + k_0502___options_with_save.kmn 1.0 .kmn - id_k_024___options_with_save_and_preset - k_024___options_with_save_and_preset.kmn - k_024___options_with_save_and_preset.kmn + id_k_0503___options_with_save_and_preset + k_0503___options_with_save_and_preset.kmn + k_0503___options_with_save_and_preset.kmn 1.0 .kmn - id_k_025___options_with_reset - k_025___options_with_reset.kmn - k_025___options_with_reset.kmn + id_k_0504___options_with_reset + k_0504___options_with_reset.kmn + k_0504___options_with_reset.kmn 1.0 .kmn - id_k_026___system_stores - k_026___system_stores.kmn - k_026___system_stores.kmn + id_k_0600___system_stores + k_0600___system_stores.kmn + k_0600___system_stores.kmn 1.0 .kmn - id_k_027___system_stores_2 - k_027___system_stores_2.kmn - k_027___system_stores_2.kmn + id_k_0601___system_stores_2 + k_0601___system_stores_2.kmn + k_0601___system_stores_2.kmn 1.0 .kmn - id_k_028___smp - k_028___smp.kmn - k_028___smp.kmn + id_k_0106___smp + k_0106___smp.kmn + k_0106___smp.kmn 1.0 .kmn - id_k_029___beep - k_029___beep.kmn - k_029___beep.kmn + id_k_0005___beep + k_0005___beep.kmn + k_0005___beep.kmn 1.0 .kmn - id_k_030___multiple_groups - k_030___multiple_groups.kmn - k_030___multiple_groups.kmn + id_k_0401___multiple_groups + k_0401___multiple_groups.kmn + k_0401___multiple_groups.kmn 1.0 .kmn - id_k_031___caps_lock - k_031___caps_lock.kmn - k_031___caps_lock.kmn + id_k_0700___caps_lock + k_0700___caps_lock.kmn + k_0700___caps_lock.kmn 1.0 .kmn - id_k_032___caps_control - k_032___caps_control.kmn - k_032___caps_control.kmn + id_k_0701___caps_control + k_0701___caps_control.kmn + k_0701___caps_control.kmn 1.0 .kmn - id_k_033___caps_always_off - k_033___caps_always_off.kmn - k_033___caps_always_off.kmn + id_k_0702___caps_always_off + k_0702___caps_always_off.kmn + k_0702___caps_always_off.kmn 1.0 .kmn - id_k_034___options_double_set_reset - k_034___options_double_set_reset.kmn - k_034___options_double_set_reset.kmn + id_k_0505___options_double_set_reset + k_0505___options_double_set_reset.kmn + k_0505___options_double_set_reset.kmn 1.0 .kmn - id_k_035___options_double_set_staged - k_035___options_double_set_staged.kmn - k_035___options_double_set_staged.kmn + id_k_0506___options_double_set_staged + k_0506___options_double_set_staged.kmn + k_0506___options_double_set_staged.kmn 1.0 .kmn - id_k_036___options___double_reset_staged - k_036___options___double_reset_staged.kmn - k_036___options___double_reset_staged.kmn + id_k_0507___options___double_reset_staged + k_0507___options___double_reset_staged.kmn + k_0507___options___double_reset_staged.kmn 1.0 .kmn - id_k_037___options___double_reset - k_037___options___double_reset.kmn - k_037___options___double_reset.kmn + id_k_0508___options___double_reset + k_0508___options___double_reset.kmn + k_0508___options___double_reset.kmn 1.0 .kmn - id_k_038___punctkeys - k_038___punctkeys.kmn - k_038___punctkeys.kmn + id_k_0107___punctkeys + k_0107___punctkeys.kmn + k_0107___punctkeys.kmn 1.0 .kmn - id_k_039___generic_ctrlalt - k_039___generic_ctrlalt.kmn - k_039___generic_ctrlalt.kmn + id_k_0203___generic_ctrlalt + k_0203___generic_ctrlalt.kmn + k_0203___generic_ctrlalt.kmn 1.0 .kmn - id_k_040___long_context - k_040___long_context.kmn - k_040___long_context.kmn + id_k_0800___long_context + k_0800___long_context.kmn + k_0800___long_context.kmn 1.0 .kmn - id_k_041___long_context_and_deadkeys - k_041___long_context_and_deadkeys.kmn - k_041___long_context_and_deadkeys.kmn + id_k_0801___long_context_and_deadkeys + k_0801___long_context_and_deadkeys.kmn + k_0801___long_context_and_deadkeys.kmn 1.0 .kmn - id_k_042___long_context_and_split_deadkeys - k_042___long_context_and_split_deadkeys.kmn - k_042___long_context_and_split_deadkeys.kmn + id_k_0802___long_context_and_split_deadkeys + k_0802___long_context_and_split_deadkeys.kmn + k_0802___long_context_and_split_deadkeys.kmn 1.0 .kmn - id_k_043___output_and_keystroke - k_043___output_and_keystroke.kmn - k_043___output_and_keystroke.kmn + id_k_0402___output_and_keystroke + k_0402___output_and_keystroke.kmn + k_0402___output_and_keystroke.kmn 1.0 .kmn - id_k_044___if_and_context - k_044___if_and_context.kmn - k_044___if_and_context.kmn + id_k_0803___if_and_context + k_0803___if_and_context.kmn + k_0803___if_and_context.kmn 1.0 .kmn - id_k_045___deadkey_and_context - k_045___deadkey_and_context.kmn - k_045___deadkey_and_context.kmn + id_k_0804___deadkey_and_context + k_0804___deadkey_and_context.kmn + k_0804___deadkey_and_context.kmn 1.0 .kmn - id_k_046___deadkey_and_contextex - k_046___deadkey_and_contextex.kmn - k_046___deadkey_and_contextex.kmn + id_k_0805___deadkey_and_contextex + k_0805___deadkey_and_contextex.kmn + k_0805___deadkey_and_contextex.kmn 1.0 .kmn - id_k_047___caps_always_off_initially_on - k_047___caps_always_off_initially_on.kmn - k_047___caps_always_off_initially_on.kmn + id_k_0703___caps_always_off_initially_on + k_0703___caps_always_off_initially_on.kmn + k_0703___caps_always_off_initially_on.kmn 1.0 .kmn - id_k_048___modifier_keys_keep_context - k_048___modifier_keys_keep_context.kmn - k_048___modifier_keys_keep_context.kmn + id_k_0806___modifier_keys_keep_context + k_0806___modifier_keys_keep_context.kmn + k_0806___modifier_keys_keep_context.kmn 1.0 .kmn - id_k_049___enter_invalidates_context - k_049___enter_invalidates_context.kmn - k_049___enter_invalidates_context.kmn + id_k_0807___enter_invalidates_context + k_0807___enter_invalidates_context.kmn + k_0807___enter_invalidates_context.kmn 1.0 .kmn diff --git a/common/test/keyboards/baseline/build.sh b/common/test/keyboards/baseline/build.sh index 1428b5e0c4..3a1e8d9f1e 100755 --- a/common/test/keyboards/baseline/build.sh +++ b/common/test/keyboards/baseline/build.sh @@ -17,7 +17,7 @@ builder_parse "$@" builder_describe_outputs \ configure kmcomp/kmcomp.exe \ - build k_000___null_keyboard.kmx + build k_0000___null_keyboard.kmx do_configure() { mkdir -p kmcomp @@ -25,9 +25,15 @@ do_configure() { } do_build() { - local name + local name jsname for name in *.kmn; do - ./kmcomp/kmcomp.exe -no-compiler-version -d "$name" + jsname="$(basename "${name%.kmn}").js" + ./kmcomp/kmcomp.exe -no-compiler-version -d "${name}" + if [[ "${name}" != "k_0812___nul_and_contextex.kmn" ]]; then + # k_0812___nul_and_contextex.kmn fails to compile because contextex + # is not currently supported in context() match, so we skip it + ./kmcomp/kmcomp.exe -no-compiler-version -d "${name}" "${jsname}" + fi done } diff --git a/common/test/keyboards/baseline/k_0000___null_keyboard.js b/common/test/keyboards/baseline/k_0000___null_keyboard.js new file mode 100644 index 0000000000..076ec597c4 --- /dev/null +++ b/common/test/keyboards/baseline/k_0000___null_keyboard.js @@ -0,0 +1,28 @@ + +KeymanWeb.KR(new Keyboard_k_0000___null_keyboard()); + +function Keyboard_k_0000___null_keyboard() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0000___null_keyboard"; + this.KN="0000 - null keyboard"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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; + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_000___null_keyboard.kmn b/common/test/keyboards/baseline/k_0000___null_keyboard.kmn similarity index 84% rename from common/test/keyboards/baseline/k_000___null_keyboard.kmn rename to common/test/keyboards/baseline/k_0000___null_keyboard.kmn index ecae49acde..57321e6d63 100644 --- a/common/test/keyboards/baseline/k_000___null_keyboard.kmn +++ b/common/test/keyboards/baseline/k_0000___null_keyboard.kmn @@ -1,4 +1,4 @@ -store(&NAME) '000 - null keyboard' +store(&NAME) '0000 - null keyboard' c Description: Tests null keyboard c keys: [K_A][RALT K_B][SHIFT K_C] c expected: aC diff --git a/common/test/keyboards/baseline/k_0000___null_keyboard.kmx b/common/test/keyboards/baseline/k_0000___null_keyboard.kmx new file mode 100644 index 0000000000..dfc85b5e2a Binary files /dev/null and b/common/test/keyboards/baseline/k_0000___null_keyboard.kmx differ diff --git a/common/test/keyboards/baseline/k_0001___nul.js b/common/test/keyboards/baseline/k_0001___nul.js new file mode 100644 index 0000000000..d33ee337cf --- /dev/null +++ b/common/test/keyboards/baseline/k_0001___nul.js @@ -0,0 +1,42 @@ + +KeymanWeb.KR(new Keyboard_k_0001___nul()); + +function Keyboard_k_0001___nul() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0001___nul"; + this.KN="0001 - nul"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x41)) { + if(k.KN(0,t)){ + r=m=1; // Line 13 + k.KO(0,t,"b"); + } + else if(k.KCM(1,t,"b",1)){ + r=m=1; // Line 14 + k.KO(1,t,"c"); + } + else if(1){ + r=m=1; // Line 15 + k.KO(0,t,"d"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_003___nul.kmn b/common/test/keyboards/baseline/k_0001___nul.kmn similarity index 83% rename from common/test/keyboards/baseline/k_003___nul.kmn rename to common/test/keyboards/baseline/k_0001___nul.kmn index 32f6e84839..44d92b628c 100644 --- a/common/test/keyboards/baseline/k_003___nul.kmn +++ b/common/test/keyboards/baseline/k_0001___nul.kmn @@ -1,8 +1,8 @@ -store(&NAME) '003 - nul' +store(&NAME) '0001 - nul' c Description: Tests nul context c keys: [K_A][K_A][K_A] c expected: cd -c context: +c context: store(&version) '6.0' diff --git a/common/test/keyboards/baseline/k_0001___nul.kmx b/common/test/keyboards/baseline/k_0001___nul.kmx new file mode 100644 index 0000000000..6795c349f5 Binary files /dev/null and b/common/test/keyboards/baseline/k_0001___nul.kmx differ diff --git a/common/test/keyboards/baseline/k_0002___nul_with_initial_context.js b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.js new file mode 100644 index 0000000000..ca42f2a1f3 --- /dev/null +++ b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.js @@ -0,0 +1,42 @@ + +KeymanWeb.KR(new Keyboard_k_0002___nul_with_initial_context()); + +function Keyboard_k_0002___nul_with_initial_context() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0002___nul_with_initial_context"; + this.KN="0002 - nul with initial context"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x41)) { + if(k.KN(0,t)){ + r=m=1; // Line 13 + k.KO(0,t,"b"); + } + else if(k.KCM(1,t,"b",1)){ + r=m=1; // Line 14 + k.KO(1,t,"c"); + } + else if(1){ + r=m=1; // Line 15 + k.KO(0,t,"d"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_005___nul_with_initial_context.kmn b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmn similarity index 83% rename from common/test/keyboards/baseline/k_005___nul_with_initial_context.kmn rename to common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmn index f59016cbe1..4ae05e6ba4 100644 --- a/common/test/keyboards/baseline/k_005___nul_with_initial_context.kmn +++ b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '005 - nul with initial context' +store(&NAME) '0002 - nul with initial context' c Description: Tests nul context with an initial context supplied c keys: [K_A][K_A] c expected: xdd diff --git a/common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmx b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmx new file mode 100644 index 0000000000..3d89b790f5 Binary files /dev/null and b/common/test/keyboards/baseline/k_0002___nul_with_initial_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0003___nul_testing.js b/common/test/keyboards/baseline/k_0003___nul_testing.js new file mode 100644 index 0000000000..330a614dba --- /dev/null +++ b/common/test/keyboards/baseline/k_0003___nul_testing.js @@ -0,0 +1,34 @@ + +KeymanWeb.KR(new Keyboard_k_0003___nul_testing()); + +function Keyboard_k_0003___nul_testing() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0003___nul_testing"; + this.KN="0003 - nul testing"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x41)) { + if(k.KN(0,t)){ + r=m=1; // Line 12 + k.KO(0,t,"OK"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_018___nul_testing.kmn b/common/test/keyboards/baseline/k_0003___nul_testing.kmn similarity index 87% rename from common/test/keyboards/baseline/k_018___nul_testing.kmn rename to common/test/keyboards/baseline/k_0003___nul_testing.kmn index 20da4d4af7..87fc78f86f 100644 --- a/common/test/keyboards/baseline/k_018___nul_testing.kmn +++ b/common/test/keyboards/baseline/k_0003___nul_testing.kmn @@ -1,4 +1,4 @@ -store(&NAME) '018 - nul testing' +store(&NAME) '0003 - nul testing' c Description: Tests the processing of nul in LHS of rules c keys: [K_A][K_A] c expected: OKa diff --git a/common/test/keyboards/baseline/k_0003___nul_testing.kmx b/common/test/keyboards/baseline/k_0003___nul_testing.kmx new file mode 100644 index 0000000000..e30ca2494d Binary files /dev/null and b/common/test/keyboards/baseline/k_0003___nul_testing.kmx differ diff --git a/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.js b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.js new file mode 100644 index 0000000000..a4ee094cb5 --- /dev/null +++ b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.js @@ -0,0 +1,46 @@ + +KeymanWeb.KR(new Keyboard_k_0004___space_mnemonic_kbd()); + +function Keyboard_k_0004___space_mnemonic_kbd() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0004___space_mnemonic_kbd"; + this.KN="0004 - space mnemonic kbd"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=1; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x20)) { + if(k.KCM(2,t,"ab",2)){ + r=m=1; // Line 14 + k.KO(2,t,"X"); + } + } + else if(k.KKM(e, 0x4000, 0x64)) { + if(k.KCM(2,t,"c ",2)){ + r=m=1; // Line 15 + k.KO(2,t,"Y"); + } + } + else if(k.KKM(e, 0x4000, 0x65)) { + if(k.KCM(2,t," d",2)){ + r=m=1; // Line 16 + k.KO(2,t,"Z"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmn b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmn similarity index 90% rename from common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmn rename to common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmn index 07e37ee681..2660d114d4 100644 --- a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmn +++ b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmn @@ -1,4 +1,4 @@ -store(&NAME) '017 - space mnemonic kbd' +store(&NAME) '0004 - space mnemonic kbd' c Description: Tests Space handling in mnemonic keyboards (failed with Win 98) c keys: [K_A][K_B][K_SPACE][K_C][K_SPACE][K_D][K_SPACE][K_D][K_E] c expected: XYZ diff --git a/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmx b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmx new file mode 100644 index 0000000000..b256ace536 Binary files /dev/null and b/common/test/keyboards/baseline/k_0004___space_mnemonic_kbd.kmx differ diff --git a/common/test/keyboards/baseline/k_0005___beep.js b/common/test/keyboards/baseline/k_0005___beep.js new file mode 100644 index 0000000000..e0d19f0651 --- /dev/null +++ b/common/test/keyboards/baseline/k_0005___beep.js @@ -0,0 +1,40 @@ +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_k_0005___beep()); +} +function Keyboard_k_0005___beep() +{ + 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_k_0005___beep"; + this.KN="0005 - beep"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + 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_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KB(t); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_029___beep.kmn b/common/test/keyboards/baseline/k_0005___beep.kmn similarity index 79% rename from common/test/keyboards/baseline/k_029___beep.kmn rename to common/test/keyboards/baseline/k_0005___beep.kmn index 65e650ee44..b9b9fcab8c 100644 --- a/common/test/keyboards/baseline/k_029___beep.kmn +++ b/common/test/keyboards/baseline/k_0005___beep.kmn @@ -1,8 +1,8 @@ -store(&NAME) '029 - beep' +store(&NAME) '0005 - beep' c Description: Tests beep c keys: [K_1] c expected: \b -c context: +c context: store(&version) '10.0' diff --git a/common/test/keyboards/baseline/k_0005___beep.kmx b/common/test/keyboards/baseline/k_0005___beep.kmx new file mode 100644 index 0000000000..c491183f26 Binary files /dev/null and b/common/test/keyboards/baseline/k_0005___beep.kmx differ diff --git a/common/test/keyboards/baseline/k_000___null_keyboard.js b/common/test/keyboards/baseline/k_000___null_keyboard.js deleted file mode 100755 index d22b7f3287..0000000000 --- a/common/test/keyboards/baseline/k_000___null_keyboard.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_000___null_keyboard());function Keyboard_k_000___null_keyboard(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_000___null_keyboard";this.KN="000 - null keyboard";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_000___null_keyboard.kmx b/common/test/keyboards/baseline/k_000___null_keyboard.kmx deleted file mode 100644 index 2ac1a0f65f..0000000000 Binary files a/common/test/keyboards/baseline/k_000___null_keyboard.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_001___basic_input_unicodei.js b/common/test/keyboards/baseline/k_001___basic_input_unicodei.js deleted file mode 100755 index 2c6ff5d98a..0000000000 --- a/common/test/keyboards/baseline/k_001___basic_input_unicodei.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_001___basic_input_unicodei());function Keyboard_k_001___basic_input_unicodei(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_001___basic_input_unicodei";this.KN="001 - basic input UnicodeI";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,65)) {if(1){r=m=1;k.KO(0,t,"a");}}else if(k.KKM(e,16400,66)) {if(1){r=m=1;k.KO(0,t,"b");}}else if(k.KKM(e,16400,67)) {if(1){r=m=1;k.KO(0,t,"c");}}else if(k.KKM(e,16400,70)) {if(k.KCM(2,t,"DE",2)){r=m=1;k.KO(2,t,"def");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_001___basic_input_unicodei.kmx b/common/test/keyboards/baseline/k_001___basic_input_unicodei.kmx deleted file mode 100644 index 82f60cd001..0000000000 Binary files a/common/test/keyboards/baseline/k_001___basic_input_unicodei.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_002___basic_input_unicode.js b/common/test/keyboards/baseline/k_002___basic_input_unicode.js deleted file mode 100755 index 660dbc905e..0000000000 --- a/common/test/keyboards/baseline/k_002___basic_input_unicode.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_002___basic_input_unicode());function Keyboard_k_002___basic_input_unicode(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_002___basic_input_unicode";this.KN="002 - basic input Unicode";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,65)) {if(1){r=m=1;k.KO(0,t,"ก");}}else if(k.KKM(e,16400,66)) {if(1){r=m=1;k.KO(0,t,"ข");}}else if(k.KKM(e,16400,67)) {if(1){r=m=1;k.KO(0,t,"ฃ");}}else if(k.KKM(e,16400,70)) {if(k.KCM(2,t,"DE",2)){r=m=1;k.KO(2,t,"คฅฆ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_002___basic_input_unicode.kmx b/common/test/keyboards/baseline/k_002___basic_input_unicode.kmx deleted file mode 100644 index 5f1497a29e..0000000000 Binary files a/common/test/keyboards/baseline/k_002___basic_input_unicode.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_003___nul.js b/common/test/keyboards/baseline/k_003___nul.js deleted file mode 100755 index 8adf3b1c69..0000000000 --- a/common/test/keyboards/baseline/k_003___nul.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_003___nul());function Keyboard_k_003___nul(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_003___nul";this.KN="003 - nul";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(k.KN(0,t)){r=m=1;k.KO(0,t,"b");}else if(k.KCM(1,t,"b",1)){r=m=1;k.KO(1,t,"c");}else if(1){r=m=1;k.KO(0,t,"d");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_003___nul.kmx b/common/test/keyboards/baseline/k_003___nul.kmx deleted file mode 100644 index 9a5e835e04..0000000000 Binary files a/common/test/keyboards/baseline/k_003___nul.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.js b/common/test/keyboards/baseline/k_004___basic_input__shift_2_.js deleted file mode 100755 index de9374fe92..0000000000 --- a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_004___basic_input__shift_2_());function Keyboard_k_004___basic_input__shift_2_(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_004___basic_input__shift_2_";this.KN="004 - basic input (shift 2)";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,65)) {if(1){r=m=1;k.KO(0,t,"ก");}}else if(k.KKM(e,16400,66)) {if(1){r=m=1;k.KO(0,t,"ข");}}else if(k.KKM(e,16400,67)) {if(1){r=m=1;k.KO(0,t,"ฃ");}}else if(k.KKM(e,16400,70)) {if(k.KCM(2,t,"DE",2)){r=m=1;k.KO(2,t,"คฅฆ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmx b/common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmx deleted file mode 100644 index c465d596d5..0000000000 Binary files a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_005___nul_with_initial_context.js b/common/test/keyboards/baseline/k_005___nul_with_initial_context.js deleted file mode 100755 index 114018d2f4..0000000000 --- a/common/test/keyboards/baseline/k_005___nul_with_initial_context.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_005___nul_with_initial_context());function Keyboard_k_005___nul_with_initial_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_005___nul_with_initial_context";this.KN="005 - nul with initial context";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(k.KN(0,t)){r=m=1;k.KO(0,t,"b");}else if(k.KCM(1,t,"b",1)){r=m=1;k.KO(1,t,"c");}else if(1){r=m=1;k.KO(0,t,"d");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_005___nul_with_initial_context.kmx b/common/test/keyboards/baseline/k_005___nul_with_initial_context.kmx deleted file mode 100644 index 53f9889b32..0000000000 Binary files a/common/test/keyboards/baseline/k_005___nul_with_initial_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.js b/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.js deleted file mode 100755 index 28e7b1525d..0000000000 --- a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_006___vkey_input__shift_ctrl_());function Keyboard_k_006___vkey_input__shift_ctrl_(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_006___vkey_input__shift_ctrl_";this.KN="006 - vkey input (shift ctrl)";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0030;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16432,65)) {if(1){r=m=1;k.KO(0,t,"ก");}}else if(k.KKM(e,16400,66)) {if(1){r=m=1;k.KO(0,t,"ข");}}else if(k.KKM(e,16432,67)) {if(1){r=m=1;k.KO(0,t,"ฃ");}}else if(k.KKM(e,16400,70)) {if(k.KCM(2,t,"DE",2)){r=m=1;k.KO(2,t,"คฅฆ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmx b/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmx deleted file mode 100644 index 6651a91b19..0000000000 Binary files a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.js b/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.js deleted file mode 100755 index e4b0e5f291..0000000000 --- a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_007___vkey_input__ctrl_alt_());function Keyboard_k_007___vkey_input__ctrl_alt_(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_007___vkey_input__ctrl_alt_";this.KN="007 - vkey input (ctrl alt)";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0060;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16480,65)) {if(1){r=m=1;k.KO(0,t,"ก");}}else if(k.KKM(e,16384,66)) {if(1){r=m=1;k.KO(0,t,"ข");}}else if(k.KKM(e,16480,67)) {if(1){r=m=1;k.KO(0,t,"ฃ");}}else if(k.KKM(e,16480,70)) {if(k.KCM(2,t,"de",2)){r=m=1;k.KO(2,t,"คฅฆ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmx b/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmx deleted file mode 100644 index 3000af8a80..0000000000 Binary files a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.js b/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.js deleted file mode 100755 index 11ca6ba19f..0000000000 --- a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_008___vkey_input__ctrl_alt_2_());function Keyboard_k_008___vkey_input__ctrl_alt_2_(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_008___vkey_input__ctrl_alt_2_";this.KN="008 - vkey input (ctrl alt 2)";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0060;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16480,65)) {if(1){r=m=1;k.KO(0,t,"ก");}}else if(k.KKM(e,16480,67)) {if(1){r=m=1;k.KO(0,t,"ฃ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmx b/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmx deleted file mode 100644 index b12a0f15c8..0000000000 Binary files a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0100___basic_input_unicodei.js b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.js new file mode 100644 index 0000000000..86e960301a --- /dev/null +++ b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0100___basic_input_unicodei()); + +function Keyboard_k_0100___basic_input_unicodei() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0100___basic_input_unicodei"; + this.KN="0100 - basic input UnicodeI"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0010; + 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, 0x4010, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"a"); + } + } + else if(k.KKM(e, 0x4010, 0x42)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"b"); + } + } + else if(k.KKM(e, 0x4010, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"c"); + } + } + else if(k.KKM(e, 0x4010, 0x46)) { + if(k.KCM(2,t,"DE",2)){ + r=m=1; // Line 17 + k.KO(2,t,"def"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_001___basic_input_unicodei.kmn b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmn similarity index 85% rename from common/test/keyboards/baseline/k_001___basic_input_unicodei.kmn rename to common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmn index 446c0e8f1d..da80e98ca7 100644 --- a/common/test/keyboards/baseline/k_001___basic_input_unicodei.kmn +++ b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmn @@ -1,8 +1,8 @@ -store(&NAME) '001 - basic input UnicodeI' +store(&NAME) '0100 - basic input UnicodeI' c Description: Tests basic input with simple context rules, ANSI characters used only c keys: [SHIFT K_A][SHIFT K_B][SHIFT K_C][SHIFT K_SPACE][SHIFT K_D][SHIFT K_E][SHIFT K_F] c expected: abc def -c context: +c context: store(&version) '6.0' diff --git a/common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmx b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmx new file mode 100644 index 0000000000..b31daddd07 Binary files /dev/null and b/common/test/keyboards/baseline/k_0100___basic_input_unicodei.kmx differ diff --git a/common/test/keyboards/baseline/k_0101___basic_input_unicode.js b/common/test/keyboards/baseline/k_0101___basic_input_unicode.js new file mode 100644 index 0000000000..74dc5e3ddb --- /dev/null +++ b/common/test/keyboards/baseline/k_0101___basic_input_unicode.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0101___basic_input_unicode()); + +function Keyboard_k_0101___basic_input_unicode() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0101___basic_input_unicode"; + this.KN="0101 - basic input Unicode"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0010; + 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, 0x4010, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"ก"); + } + } + else if(k.KKM(e, 0x4010, 0x42)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ข"); + } + } + else if(k.KKM(e, 0x4010, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ฃ"); + } + } + else if(k.KKM(e, 0x4010, 0x46)) { + if(k.KCM(2,t,"DE",2)){ + r=m=1; // Line 17 + k.KO(2,t,"คฅฆ"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_002___basic_input_unicode.kmn b/common/test/keyboards/baseline/k_0101___basic_input_unicode.kmn similarity index 90% rename from common/test/keyboards/baseline/k_002___basic_input_unicode.kmn rename to common/test/keyboards/baseline/k_0101___basic_input_unicode.kmn index 04c6df9f4a..a14821c8b6 100644 --- a/common/test/keyboards/baseline/k_002___basic_input_unicode.kmn +++ b/common/test/keyboards/baseline/k_0101___basic_input_unicode.kmn @@ -1,4 +1,4 @@ -store(&NAME) '002 - basic input Unicode' +store(&NAME) '0101 - basic input Unicode' c Description: Tests basic input with simple context rules (Unicode) c keys: [SHIFT K_A][SHIFT K_B][SHIFT K_C][SHIFT K_SPACE][SHIFT K_D][SHIFT K_E][SHIFT K_F] c expected: \u0E01\u0E02\u0E03\u0020\u0E04\u0E05\u0E06 diff --git a/common/test/keyboards/baseline/k_0101___basic_input_unicode.kmx b/common/test/keyboards/baseline/k_0101___basic_input_unicode.kmx new file mode 100644 index 0000000000..acf956d6b4 Binary files /dev/null and b/common/test/keyboards/baseline/k_0101___basic_input_unicode.kmx differ diff --git a/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.js b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.js new file mode 100644 index 0000000000..a7ce73ed87 --- /dev/null +++ b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0102___basic_input__shift_2_()); + +function Keyboard_k_0102___basic_input__shift_2_() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0102___basic_input__shift_2_"; + this.KN="0102 - basic input (shift 2)"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0010; + 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, 0x4010, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"ก"); + } + } + else if(k.KKM(e, 0x4010, 0x42)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ข"); + } + } + else if(k.KKM(e, 0x4010, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ฃ"); + } + } + else if(k.KKM(e, 0x4010, 0x46)) { + if(k.KCM(2,t,"DE",2)){ + r=m=1; // Line 17 + k.KO(2,t,"คฅฆ"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmn b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmn similarity index 85% rename from common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmn rename to common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmn index d878214427..0b072799ac 100644 --- a/common/test/keyboards/baseline/k_004___basic_input__shift_2_.kmn +++ b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmn @@ -1,13 +1,13 @@ -store(&NAME) '004 - basic input (shift 2)' +store(&NAME) '0102 - basic input (shift 2)' c Description: Tests basic vkey input with shift only (Unicode) c keys: [SHIFT K_A][SHIFT K_B][SHIFT K_C][SHIFT K_SPACE][SHIFT K_D][SHIFT K_E][SHIFT K_F] c expected: \u0E01\u0E02\u0E03\u0020\u0E04\u0E05\u0E06 -c context: +c context: store(&version) '6.0' begin Unicode > use(Main) - + group(Main) using keys + [SHIFT K_A] > U+0E01 diff --git a/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmx b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmx new file mode 100644 index 0000000000..2e431a12ef Binary files /dev/null and b/common/test/keyboards/baseline/k_0102___basic_input__shift_2_.kmx differ diff --git a/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.js b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.js new file mode 100644 index 0000000000..0775346e75 --- /dev/null +++ b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0103___vkey_input__shift_ctrl_()); + +function Keyboard_k_0103___vkey_input__shift_ctrl_() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0103___vkey_input__shift_ctrl_"; + this.KN="0103 - vkey input (shift ctrl)"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0030; + 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, 0x4030, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"ก"); + } + } + else if(k.KKM(e, 0x4010, 0x42)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ข"); + } + } + else if(k.KKM(e, 0x4030, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ฃ"); + } + } + else if(k.KKM(e, 0x4010, 0x46)) { + if(k.KCM(2,t,"DE",2)){ + r=m=1; // Line 17 + k.KO(2,t,"คฅฆ"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmn b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmn similarity index 86% rename from common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmn rename to common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmn index 9a966aa651..c9947cfcc5 100644 --- a/common/test/keyboards/baseline/k_006___vkey_input__shift_ctrl_.kmn +++ b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmn @@ -1,13 +1,13 @@ -store(&NAME) '006 - vkey input (shift ctrl)' +store(&NAME) '0103 - vkey input (shift ctrl)' c Description: Tests basic vkey input with shift and control (Unicode) c keys: [LCTRL SHIFT K_A][SHIFT K_B][RCTRL SHIFT K_C][K_SPACE][SHIFT K_D][SHIFT K_E][SHIFT K_F] c expected: \u0E01\u0E02\u0E03\u0020\u0E04\u0E05\u0E06 -c context: +c context: store(&version) '6.0' begin Unicode > use(Main) - + group(Main) using keys + [SHIFT CTRL K_A] > U+0E01 diff --git a/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmx b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmx new file mode 100644 index 0000000000..9a9747c33d Binary files /dev/null and b/common/test/keyboards/baseline/k_0103___vkey_input__shift_ctrl_.kmx differ diff --git a/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.js b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.js new file mode 100644 index 0000000000..ee6e25596f --- /dev/null +++ b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0104___vkey_input__ctrl_alt_()); + +function Keyboard_k_0104___vkey_input__ctrl_alt_() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0104___vkey_input__ctrl_alt_"; + this.KN="0104 - vkey input (ctrl alt)"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0060; + 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, 0x4060, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"ก"); + } + } + else if(k.KKM(e, 0x4000, 0x42)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ข"); + } + } + else if(k.KKM(e, 0x4060, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ฃ"); + } + } + else if(k.KKM(e, 0x4060, 0x46)) { + if(k.KCM(2,t,"de",2)){ + r=m=1; // Line 17 + k.KO(2,t,"คฅฆ"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmn b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmn similarity index 85% rename from common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmn rename to common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmn index 3c2eb42bfe..a7e7b60810 100644 --- a/common/test/keyboards/baseline/k_007___vkey_input__ctrl_alt_.kmn +++ b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmn @@ -1,15 +1,15 @@ -store(&NAME) '007 - vkey input (ctrl alt)' +store(&NAME) '0104 - vkey input (ctrl alt)' c Description: Tests basic vkey input with control and alt (Unicode) c keys: [LCTRL LALT K_A][K_B][RCTRL RALT K_C][K_SPACE][K_D][K_E][LCTRL LALT K_F] c expected: \u0E01\u0E02\u0E03\u0020\u0E04\u0E05\u0E06 -c context: +c context: store(&version) '6.0' begin Unicode > use(Main) group(Main) using keys - + + [CTRL ALT K_A] > U+0E01 + [K_B] > U+0E02 + [CTRL ALT K_C] > U+0E03 diff --git a/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmx b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmx new file mode 100644 index 0000000000..ae53a86547 Binary files /dev/null and b/common/test/keyboards/baseline/k_0104___vkey_input__ctrl_alt_.kmx differ diff --git a/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.js b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.js new file mode 100644 index 0000000000..2a6c8c0d02 --- /dev/null +++ b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.js @@ -0,0 +1,40 @@ + +KeymanWeb.KR(new Keyboard_k_0105___vkey_input__ctrl_alt_2_()); + +function Keyboard_k_0105___vkey_input__ctrl_alt_2_() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0105___vkey_input__ctrl_alt_2_"; + this.KN="0105 - vkey input (ctrl alt 2)"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0060; + 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, 0x4060, 0x41)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ก"); + } + } + else if(k.KKM(e, 0x4060, 0x43)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ฃ"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmn b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmn similarity index 87% rename from common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmn rename to common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmn index d1660c40f2..6baa092327 100644 --- a/common/test/keyboards/baseline/k_008___vkey_input__ctrl_alt_2_.kmn +++ b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmn @@ -1,4 +1,4 @@ -store(&NAME) '008 - vkey input (ctrl alt 2)' +store(&NAME) '0105 - vkey input (ctrl alt 2)' c Description: Tests basic vkey input with control and alt (Unicode) c keys: [LCTRL LALT K_A][LCTRL LALT K_B][LCTRL LALT K_C] c expected: \u0E01\u0E03 diff --git a/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmx b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmx new file mode 100644 index 0000000000..6f88e25389 Binary files /dev/null and b/common/test/keyboards/baseline/k_0105___vkey_input__ctrl_alt_2_.kmx differ diff --git a/common/test/keyboards/baseline/k_0106___smp.js b/common/test/keyboards/baseline/k_0106___smp.js new file mode 100644 index 0000000000..e7c75e32d7 --- /dev/null +++ b/common/test/keyboards/baseline/k_0106___smp.js @@ -0,0 +1,80 @@ +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_k_0106___smp()); +} +function Keyboard_k_0106___smp() +{ + 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_k_0106___smp"; + this.KN="0106 - smp"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.KS=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_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 15 + k.KDC(0,t); + k.KO(-1,t,"🙂"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(k.KFCM(1,t,['🙂'])){ + r=m=1; // Line 16 + k.KDC(1,t); + k.KO(-1,t,"🙂hi😀"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(k.KFCM(1,t,['😀'])){ + r=m=1; // Line 17 + k.KDC(1,t); + k.KO(-1,t,"x"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_4 /* 0x34 */)) { + if(k.KFCM(4,t,['🙂','h','i','x'])){ + r=m=1; // Line 18 + k.KDC(4,t); + k.KO(-1,t,"😁y"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_5 /* 0x35 */)) { + if(1){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KO(-1,t,"𐌳"); + r=this.g_second_1(t,e); + m=2; + } + } + return r; + }; + this.g_second_1=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KFCM(1,t,['𐌳'])){ + m=1; // Line 26 + k.KDC(1,t); + k.KO(-1,t,"x"); + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_028___smp.kmn b/common/test/keyboards/baseline/k_0106___smp.kmn similarity index 94% rename from common/test/keyboards/baseline/k_028___smp.kmn rename to common/test/keyboards/baseline/k_0106___smp.kmn index 7c1eaaba96..3ce026ca4c 100644 --- a/common/test/keyboards/baseline/k_028___smp.kmn +++ b/common/test/keyboards/baseline/k_0106___smp.kmn @@ -1,4 +1,4 @@ -store(&NAME) '028 - smp' +store(&NAME) '0106 - smp' c Description: Tests SMP characters; see #4361 [1-4], #5561 [5] c keys: [K_1][K_2][K_3][K_4][K_5] c expected: \U0001F601yx diff --git a/common/test/keyboards/baseline/k_0106___smp.kmx b/common/test/keyboards/baseline/k_0106___smp.kmx new file mode 100644 index 0000000000..cfbb429d0b Binary files /dev/null and b/common/test/keyboards/baseline/k_0106___smp.kmx differ diff --git a/common/test/keyboards/baseline/k_0107___punctkeys.js b/common/test/keyboards/baseline/k_0107___punctkeys.js new file mode 100644 index 0000000000..a5455156e9 --- /dev/null +++ b/common/test/keyboards/baseline/k_0107___punctkeys.js @@ -0,0 +1,100 @@ + +KeymanWeb.KR(new Keyboard_k_0107___punctkeys()); + +function Keyboard_k_0107___punctkeys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0107___punctkeys"; + this.KN="0107 - punctkeys"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0xE2)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 24 + k.KO(1,t,"p"); + } + } + else if(k.KKM(e, 0x4000, 0xDE)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 23 + k.KO(1,t,"o"); + } + } + else if(k.KKM(e, 0x4000, 0xBC)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 15 + k.KO(1,t,"g"); + } + } + else if(k.KKM(e, 0x4000, 0xBD)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 16 + k.KO(1,t,"h"); + } + } + else if(k.KKM(e, 0x4000, 0xBE)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 17 + k.KO(1,t,"i"); + } + } + else if(k.KKM(e, 0x4000, 0xBF)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 18 + k.KO(1,t,"j"); + } + } + else if(k.KKM(e, 0x4000, 0xBA)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 13 + k.KO(1,t,"e"); + } + } + else if(k.KKM(e, 0x4000, 0xBB)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 14 + k.KO(1,t,"f"); + } + } + else if(k.KKM(e, 0x4000, 0xDB)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 20 + k.KO(1,t,"l"); + } + } + else if(k.KKM(e, 0x4000, 0xDC)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 21 + k.KO(1,t,"m"); + } + } + else if(k.KKM(e, 0x4000, 0xDD)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 22 + k.KO(1,t,"n"); + } + } + else if(k.KKM(e, 0x4000, 0xC0)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 19 + k.KO(1,t,"k"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_038___punctkeys.kmn b/common/test/keyboards/baseline/k_0107___punctkeys.kmn similarity index 92% rename from common/test/keyboards/baseline/k_038___punctkeys.kmn rename to common/test/keyboards/baseline/k_0107___punctkeys.kmn index 33f9c05297..86edfb9dc6 100644 --- a/common/test/keyboards/baseline/k_038___punctkeys.kmn +++ b/common/test/keyboards/baseline/k_0107___punctkeys.kmn @@ -1,13 +1,13 @@ -store(&NAME) '038 - punctkeys' +store(&NAME) '0107 - punctkeys' c Description: Tests punctuation keys (Unicode) c keys: [K_A][K_COLON][K_A][K_EQUAL][K_A][K_COMMA][K_A][K_HYPHEN][K_A][K_PERIOD][K_A][K_SLASH][K_A][K_BKQUOTE][K_A][K_LBRKT][K_A][K_BKSLASH][K_A][K_RBRKT][K_A][K_QUOTE][K_A][K_oE2] c expected: efghijklmnop -c context: +c context: store(&version) '6.0' begin Unicode > use(Main) - + group(Main) using keys 'a' + [K_COLON] > 'e' diff --git a/common/test/keyboards/baseline/k_0107___punctkeys.kmx b/common/test/keyboards/baseline/k_0107___punctkeys.kmx new file mode 100644 index 0000000000..d55d4d2c97 Binary files /dev/null and b/common/test/keyboards/baseline/k_0107___punctkeys.kmx differ diff --git a/common/test/keyboards/baseline/k_012___ralt.js b/common/test/keyboards/baseline/k_012___ralt.js deleted file mode 100755 index 5df180316b..0000000000 --- a/common/test/keyboards/baseline/k_012___ralt.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_012___ralt());function Keyboard_k_012___ralt(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_012___ralt";this.KN="012 - ralt";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0060;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(1){r=m=1;k.KO(0,t,"ז");}}else if(k.KKM(e,16384,79)) {if(1){r=m=1;k.KO(0,t,"ר");}}else if(k.KKM(e,16480,65)) {if(1){r=m=1;k.KO(0,t,"b");}}else if(k.KKM(e,16480,79)) {if(1){r=m=1;k.KO(0,t,"c");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_012___ralt.kmx b/common/test/keyboards/baseline/k_012___ralt.kmx deleted file mode 100644 index 3ac57c165b..0000000000 Binary files a/common/test/keyboards/baseline/k_012___ralt.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_013___deadkeys.js b/common/test/keyboards/baseline/k_013___deadkeys.js deleted file mode 100755 index 377100493f..0000000000 --- a/common/test/keyboards/baseline/k_013___deadkeys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_013___deadkeys());function Keyboard_k_013___deadkeys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_013___deadkeys";this.KN="013 - deadkeys";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,54)) {if(1){r=m=1;k.KDO(0,t,0);}}else if(k.KKM(e,16384,65)) {if(k.KDM(0,t,0)){r=m=1;k.KO(0,t,"â");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_013___deadkeys.kmx b/common/test/keyboards/baseline/k_013___deadkeys.kmx deleted file mode 100644 index 7f93d7d9ae..0000000000 Binary files a/common/test/keyboards/baseline/k_013___deadkeys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.js b/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.js deleted file mode 100755 index 65d043fda0..0000000000 --- a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_014___groups_and_virtual_keys());function Keyboard_k_014___groups_and_virtual_keys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_014___groups_and_virtual_keys";this.KN="014 - groups and virtual keys";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0070;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16416,50)) {if(1){r=m=1;k.KDO(0,t,0);}}else if(k.KKM(e,16448,50)) {if(1){r=m=1;k.KDO(0,t,0);}}else if(k.KKM(e,16400,50)) {if(1){r=m=1;k.KDO(0,t,1);}}else if(k.KKM(e,16384,65)) {if(1){r=m=1;k.KO(0,t,"α");}}if(m==1) {r=this.g1(t,e);m=2;}return r;};this.g1=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KDM(1,t,0)&&k.KCM(1,t,"α",1)){m=1;k.KO(1,t,"ᾱ");}else if(k.KDM(1,t,1)&&k.KCM(1,t,"α",1)){m=1;k.KO(1,t,"ᾰ");}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmx b/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmx deleted file mode 100644 index 03bb1508a5..0000000000 Binary files a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_015___ralt_2.js b/common/test/keyboards/baseline/k_015___ralt_2.js deleted file mode 100755 index 741a087184..0000000000 --- a/common/test/keyboards/baseline/k_015___ralt_2.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_015___ralt_2());function Keyboard_k_015___ralt_2(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_015___ralt_2";this.KN="015 - ralt 2";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(k.KCM(1,t,"c",1)){r=m=1;k.KO(1,t,"cd");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_015___ralt_2.kmx b/common/test/keyboards/baseline/k_015___ralt_2.kmx deleted file mode 100644 index 0a5e1bbf43..0000000000 Binary files a/common/test/keyboards/baseline/k_015___ralt_2.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.js b/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.js deleted file mode 100755 index 489675682d..0000000000 --- a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_017___space_mnemonic_kbd());function Keyboard_k_017___space_mnemonic_kbd(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_017___space_mnemonic_kbd";this.KN="017 - space mnemonic kbd";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=1;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,32)) {if(k.KCM(2,t,"ab",2)){r=m=1;k.KO(2,t,"X");}}else if(k.KKM(e,16384,100)) {if(k.KCM(2,t,"c ",2)){r=m=1;k.KO(2,t,"Y");}}else if(k.KKM(e,16384,101)) {if(k.KCM(2,t," d",2)){r=m=1;k.KO(2,t,"Z");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmx b/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmx deleted file mode 100644 index ffb5e1ac09..0000000000 Binary files a/common/test/keyboards/baseline/k_017___space_mnemonic_kbd.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_018___nul_testing.js b/common/test/keyboards/baseline/k_018___nul_testing.js deleted file mode 100755 index 09e69468db..0000000000 --- a/common/test/keyboards/baseline/k_018___nul_testing.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_018___nul_testing());function Keyboard_k_018___nul_testing(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_018___nul_testing";this.KN="018 - nul testing";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(k.KN(0,t)){r=m=1;k.KO(0,t,"OK");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_018___nul_testing.kmx b/common/test/keyboards/baseline/k_018___nul_testing.kmx deleted file mode 100644 index 7c54781918..0000000000 Binary files a/common/test/keyboards/baseline/k_018___nul_testing.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_019___multiple_deadkeys.js b/common/test/keyboards/baseline/k_019___multiple_deadkeys.js deleted file mode 100755 index 4e928ab0a5..0000000000 --- a/common/test/keyboards/baseline/k_019___multiple_deadkeys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_019___multiple_deadkeys());function Keyboard_k_019___multiple_deadkeys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_019___multiple_deadkeys";this.KN="019 - multiple deadkeys";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDO(0,t,0);}}else if(k.KKM(e,16384,50)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,1);}}else if(k.KKM(e,16384,51)) {if(1){r=m=1;k.KDO(0,t,2);k.KO(-1,t,"a");}}else if(k.KKM(e,16384,52)) {if(1){r=m=1;k.KDO(0,t,3);k.KDO(-1,t,4);}}else if(k.KKM(e,16384,53)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,5);k.KDO(-1,t,6);}}else if(k.KKM(e,16384,54)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,7);k.KDO(-1,t,8);k.KO(-1,t,"b");}}else if(k.KKM(e,16384,55)) {if(1){r=m=1;k.KDO(0,t,9);k.KDO(-1,t,10);k.KO(-1,t,"a");}}else if(k.KKM(e,16384,56)) {if(1){r=m=1;k.KDO(0,t,11);k.KDO(-1,t,12);k.KDO(-1,t,13);}}else if(k.KKM(e,16384,57)) {if(1){r=m=1;k.KO(0,t,"{");k.KDO(-1,t,14);k.KDO(-1,t,15);k.KO(-1,t,"}");k.KDO(-1,t,16);k.KDO(-1,t,17);}}else if(k.KKM(e,16384,88)) {if(k.KCM(2,t,"{",1)&&k.KDM(1,t,14)&&k.KDM(1,t,18)&&k.KCM(1,t,"}",1)&&k.KDM(0,t,19)&&k.KDM(0,t,20)){r=m=1;k.KO(2,t,"9=OK");}else if(k.KCM(2,t,"a",1)&&k.KDM(1,t,7)&&k.KDM(1,t,8)&&k.KCM(1,t,"b",1)){r=m=1;k.KO(2,t,"6=OK ");}else if(k.KDM(1,t,15)&&k.KCM(1,t,"}",1)&&k.KDM(0,t,16)&&k.KDM(0,t,17)){r=m=1;k.KDO(1,t,18);k.KO(-1,t,"}");k.KDO(-1,t,19);k.KDO(-1,t,20);}else if(k.KCM(1,t,"a",1)&&k.KDM(0,t,5)&&k.KDM(0,t,6)){r=m=1;k.KO(1,t,"5=OK ");}else if(k.KDM(1,t,9)&&k.KDM(1,t,10)&&k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"7=OK ");}else if(k.KDM(0,t,11)&&k.KDM(0,t,12)&&k.KDM(0,t,13)){r=m=1;k.KO(0,t,"8=OK ");}else if(k.KCM(1,t,"a",1)&&k.KDM(0,t,1)){r=m=1;k.KO(1,t,"2=OK ");}else if(k.KDM(1,t,2)&&k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"3=OK ");}else if(k.KDM(0,t,3)&&k.KDM(0,t,4)){r=m=1;k.KO(0,t,"4=OK ");}else if(k.KDM(1,t,9)&&k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"7=Fail1 ");}else if(k.KDM(1,t,10)&&k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"7=Fail2 ");}else if(k.KDM(0,t,11)&&k.KDM(0,t,12)){r=m=1;k.KO(0,t,"8=Fail4 ");}else if(k.KDM(0,t,11)&&k.KDM(0,t,13)){r=m=1;k.KO(0,t,"8=Fail5 ");}else if(k.KDM(0,t,12)&&k.KDM(0,t,13)){r=m=1;k.KO(0,t,"8=Fail6 ");}else if(k.KDM(0,t,0)){r=m=1;k.KO(0,t,"1=OK ");}else if(k.KDM(0,t,11)){r=m=1;k.KO(0,t,"8=Fail1 ");}else if(k.KDM(0,t,12)){r=m=1;k.KO(0,t,"8=Fail2 ");}else if(k.KDM(0,t,13)){r=m=1;k.KO(0,t,"8=Fail3 ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_019___multiple_deadkeys.kmx b/common/test/keyboards/baseline/k_019___multiple_deadkeys.kmx deleted file mode 100644 index fe22a2819a..0000000000 Binary files a/common/test/keyboards/baseline/k_019___multiple_deadkeys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0200___ralt.js b/common/test/keyboards/baseline/k_0200___ralt.js new file mode 100644 index 0000000000..1e4672f568 --- /dev/null +++ b/common/test/keyboards/baseline/k_0200___ralt.js @@ -0,0 +1,52 @@ + +KeymanWeb.KR(new Keyboard_k_0200___ralt()); + +function Keyboard_k_0200___ralt() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0200___ralt"; + this.KN="0200 - ralt"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0060; + 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, 0x4000, 0x41)) { + if(1){ + r=m=1; // Line 14 + k.KO(0,t,"ז"); + } + } + else if(k.KKM(e, 0x4000, 0x4F)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"ר"); + } + } + else if(k.KKM(e, 0x4060, 0x41)) { + if(1){ + r=m=1; // Line 16 + k.KO(0,t,"b"); + } + } + else if(k.KKM(e, 0x4060, 0x4F)) { + if(1){ + r=m=1; // Line 17 + k.KO(0,t,"c"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_012___ralt.kmn b/common/test/keyboards/baseline/k_0200___ralt.kmn similarity index 78% rename from common/test/keyboards/baseline/k_012___ralt.kmn rename to common/test/keyboards/baseline/k_0200___ralt.kmn index 8e041ad99e..5dd8e09ab1 100644 --- a/common/test/keyboards/baseline/k_012___ralt.kmn +++ b/common/test/keyboards/baseline/k_0200___ralt.kmn @@ -1,9 +1,9 @@ -store(&NAME) '012 - ralt' +store(&NAME) '0200 - ralt' c Description: Tests Right Alt processing: requires Ctrl+Alt simulation off. c env.simulate_altgr: 0 c keys: [RALT K_A][RALT K_O][LCTRL LALT K_A][LCTRL LALT K_O] c expected: \u05d6\u05e8\u0062\u0063 -c context: +c context: store(&VERSION) '9.0' @@ -11,7 +11,7 @@ begin Unicode > use(main) group(main) using keys -+ [RAlt K_A] > U+05D6 ++ [RAlt K_A] > U+05D6 + [RAlt K_O] > U+05E8 -+ [Ctrl Alt K_A] > "b" ++ [Ctrl Alt K_A] > "b" + [Ctrl Alt K_O] > "c" diff --git a/common/test/keyboards/baseline/k_0200___ralt.kmx b/common/test/keyboards/baseline/k_0200___ralt.kmx new file mode 100644 index 0000000000..6fd03a1b6c Binary files /dev/null and b/common/test/keyboards/baseline/k_0200___ralt.kmx differ diff --git a/common/test/keyboards/baseline/k_0201___ralt_2.js b/common/test/keyboards/baseline/k_0201___ralt_2.js new file mode 100644 index 0000000000..b4504c909d --- /dev/null +++ b/common/test/keyboards/baseline/k_0201___ralt_2.js @@ -0,0 +1,34 @@ + +KeymanWeb.KR(new Keyboard_k_0201___ralt_2()); + +function Keyboard_k_0201___ralt_2() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0201___ralt_2"; + this.KN="0201 - ralt 2"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x41)) { + if(k.KCM(1,t,"c",1)){ + r=m=1; // Line 13 + k.KO(1,t,"cd"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_015___ralt_2.kmn b/common/test/keyboards/baseline/k_0201___ralt_2.kmn similarity index 71% rename from common/test/keyboards/baseline/k_015___ralt_2.kmn rename to common/test/keyboards/baseline/k_0201___ralt_2.kmn index 631bea8d8d..6606a5d96d 100644 --- a/common/test/keyboards/baseline/k_015___ralt_2.kmn +++ b/common/test/keyboards/baseline/k_0201___ralt_2.kmn @@ -1,9 +1,10 @@ -store(&NAME) '015 - ralt 2' +store(&VERSION) '9.0' +store(&NAME) '0201 - ralt 2' c Description: Tests Right Alt processing with non-US kbds. c keys: [K_A][K_B][K_C][RALT K_A] c expected: abcd -store(&VERSION) '9.0' +store(&TARGETS) 'any' begin Unicode > use(main) diff --git a/common/test/keyboards/baseline/k_0201___ralt_2.kmx b/common/test/keyboards/baseline/k_0201___ralt_2.kmx new file mode 100644 index 0000000000..79ead9aea3 Binary files /dev/null and b/common/test/keyboards/baseline/k_0201___ralt_2.kmx differ diff --git a/common/test/keyboards/baseline/k_0203___generic_ctrlalt.js b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.js new file mode 100644 index 0000000000..de496127b2 --- /dev/null +++ b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.js @@ -0,0 +1,40 @@ + +KeymanWeb.KR(new Keyboard_k_0203___generic_ctrlalt()); + +function Keyboard_k_0203___generic_ctrlalt() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0203___generic_ctrlalt"; + this.KN="0203 - generic ctrlalt"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0060; + 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, 0x4020, 0x42)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 13 + k.KO(1,t,"b"); + } + } + else if(k.KKM(e, 0x4040, 0x43)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 14 + k.KO(1,t,"c"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_039___generic_ctrlalt.kmn b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmn similarity index 84% rename from common/test/keyboards/baseline/k_039___generic_ctrlalt.kmn rename to common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmn index 1bbb1de661..8221e7d62c 100644 --- a/common/test/keyboards/baseline/k_039___generic_ctrlalt.kmn +++ b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmn @@ -1,8 +1,8 @@ -store(&NAME) '039 - generic ctrlalt' +store(&NAME) '0203 - generic ctrlalt' c Description: Tests generic alt and control (Unicode) c keys: [K_A][K_A][LCTRL K_B][K_A][LALT K_C][K_A][RCTRL K_B][K_A][RALT K_C] c expected: abcbc -c context: +c context: store(&version) '6.0' diff --git a/common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmx b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmx new file mode 100644 index 0000000000..c2ac5c2f2f Binary files /dev/null and b/common/test/keyboards/baseline/k_0203___generic_ctrlalt.kmx differ diff --git a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.js b/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.js deleted file mode 100755 index 85742c0edd..0000000000 --- a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_020___deadkeys_and_backspace());function Keyboard_k_020___deadkeys_and_backspace(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_020___deadkeys_and_backspace";this.KN="020 - deadkeys and backspace";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,8)) {if(k.KCM(2,t,"c",1)&&k.KDM(1,t,11)&&k.KCM(1,t,"d",1)){r=m=1;k.KO(2,t," ok");}else if(k.KCM(2,t,"cd",2)){r=m=1;k.KO(2,t," fail");}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDO(0,t,0);}}else if(k.KKM(e,16384,50)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,1);}}else if(k.KKM(e,16384,51)) {if(1){r=m=1;k.KDO(0,t,2);k.KO(-1,t,"a");}}else if(k.KKM(e,16384,52)) {if(1){r=m=1;k.KDO(0,t,3);k.KDO(-1,t,4);}}else if(k.KKM(e,16384,53)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,5);k.KDO(-1,t,6);k.KO(-1,t,"b");}}else if(k.KKM(e,16384,54)) {if(1){r=m=1;k.KO(0,t,"a");k.KDO(-1,t,7);k.KDO(-1,t,8);k.KO(-1,t,"b");k.KDO(-1,t,9);k.KDO(-1,t,10);}}else if(k.KKM(e,16384,55)) {if(1){r=m=1;k.KO(0,t,"c");k.KDO(-1,t,11);k.KO(-1,t,"de");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_021___options.js b/common/test/keyboards/baseline/k_021___options.js deleted file mode 100755 index 8d0463e821..0000000000 --- a/common/test/keyboards/baseline/k_021___options.js +++ /dev/null @@ -1 +0,0 @@ -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_k_021___options());}function Keyboard_k_021___options(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_021___options";this.KN="021 - options";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="0";this.s10="1";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s11;}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;}}else if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");}else if(this.s5===this.s9){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_021___options.kmx b/common/test/keyboards/baseline/k_021___options.kmx deleted file mode 100644 index f35da34878..0000000000 Binary files a/common/test/keyboards/baseline/k_021___options.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_022___options_with_preset.js b/common/test/keyboards/baseline/k_022___options_with_preset.js deleted file mode 100755 index 2e85641ef3..0000000000 --- a/common/test/keyboards/baseline/k_022___options_with_preset.js +++ /dev/null @@ -1 +0,0 @@ -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_k_022___options_with_preset());}function Keyboard_k_022___options_with_preset(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_022___options_with_preset";this.KN="022 - options with preset";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="0";this.s10="1";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s11;k.KSAVE("foo",this.s5);}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;k.KSAVE("foo",this.s5);}}else if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");}else if(this.s5===this.s9){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_022___options_with_preset.kmx b/common/test/keyboards/baseline/k_022___options_with_preset.kmx deleted file mode 100644 index e681df8339..0000000000 Binary files a/common/test/keyboards/baseline/k_022___options_with_preset.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_023___options_with_save.js b/common/test/keyboards/baseline/k_023___options_with_save.js deleted file mode 100755 index 39fc6dba75..0000000000 --- a/common/test/keyboards/baseline/k_023___options_with_save.js +++ /dev/null @@ -1 +0,0 @@ -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_k_023___options_with_save());}function Keyboard_k_023___options_with_save(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_023___options_with_save";this.KN="023 - options with save";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="0";this.s10="1";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s11;}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;}}else if(k.KKM(e,16384,50)) {if(1){r=m=1;k.KDC(0,t);k.KSAVE("foo",this.s5);}}else if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");}else if(this.s5===this.s9){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_023___options_with_save.kmx b/common/test/keyboards/baseline/k_023___options_with_save.kmx deleted file mode 100644 index 3668b7a066..0000000000 Binary files a/common/test/keyboards/baseline/k_023___options_with_save.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.js b/common/test/keyboards/baseline/k_024___options_with_save_and_preset.js deleted file mode 100755 index 81152ece46..0000000000 --- a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.js +++ /dev/null @@ -1 +0,0 @@ -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_k_024___options_with_save_and_preset());}function Keyboard_k_024___options_with_save_and_preset(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_024___options_with_save_and_preset";this.KN="024 - options with save and preset";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="0";this.s10="1";this.s11="0";this.s12="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s11;}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;}}else if(k.KKM(e,16384,50)) {if(this.s5===this.s12){r=m=1;k.KDC(0,t);k.KSAVE("foo",this.s5);}}else if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");}else if(this.s5===this.s9){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmx b/common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmx deleted file mode 100644 index 1fecdfac21..0000000000 Binary files a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_025___options_with_reset.js b/common/test/keyboards/baseline/k_025___options_with_reset.js deleted file mode 100755 index e8a48164b0..0000000000 --- a/common/test/keyboards/baseline/k_025___options_with_reset.js +++ /dev/null @@ -1 +0,0 @@ -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_k_025___options_with_reset());}function Keyboard_k_025___options_with_reset(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_025___options_with_reset";this.KN="025 - options with reset";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="0";this.s10="1";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s11;}}else if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;}}else if(k.KKM(e,16384,51)) {if(1){r=m=1;k.KDC(0,t);this.s5=k.KLOAD(this.KI,"foo","0");}}else if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");}else if(this.s5===this.s9){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_025___options_with_reset.kmx b/common/test/keyboards/baseline/k_025___options_with_reset.kmx deleted file mode 100644 index 028f81cb5f..0000000000 Binary files a/common/test/keyboards/baseline/k_025___options_with_reset.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_026___system_stores.js b/common/test/keyboards/baseline/k_026___system_stores.js deleted file mode 100755 index b49711fb24..0000000000 --- a/common/test/keyboards/baseline/k_026___system_stores.js +++ /dev/null @@ -1 +0,0 @@ -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_k_026___system_stores());}function Keyboard_k_026___system_stores(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_026___system_stores";this.KN="026 - system stores";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="1234567890";this.s6="abcdefghij";this.s9="windows";this.s10="desktop";this.s11="hardware";this.s12="native";this.s13="en-US";this.s14="kbdus.dll";this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,49)) {if(k.KIFS(31,this.s9,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"windows.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,50)) {if(k.KIFS(31,this.s10,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"desktop.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,51)) {if(k.KIFS(31,this.s11,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"hardware.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,52)) {if(k.KIFS(31,this.s12,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"native.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,53)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,54)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,55)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,56)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,57)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,65)) {if(k.KIFS(32,this.s13,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"en-US.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,66)) {if(k.KIFS(32,this.s14,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"kbdus.dll.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,67)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,68)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,69)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,70)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,71)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,72)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,73)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,74)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_026___system_stores.kmx b/common/test/keyboards/baseline/k_026___system_stores.kmx deleted file mode 100644 index bb918cf142..0000000000 Binary files a/common/test/keyboards/baseline/k_026___system_stores.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_027___system_stores_2.js b/common/test/keyboards/baseline/k_027___system_stores_2.js deleted file mode 100755 index 47da49cf68..0000000000 --- a/common/test/keyboards/baseline/k_027___system_stores_2.js +++ /dev/null @@ -1 +0,0 @@ -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_k_027___system_stores_2());}function Keyboard_k_027___system_stores_2(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_027___system_stores_2";this.KN="027 - system stores 2";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="1234567890";this.s6="abcdefghij";this.s9="linux";this.s10="desktop";this.s11="hardware";this.s12="native";this.s13="fr-FR";this.s14="kbdfr.dll";this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,48)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,49)) {if(k.KIFS(31,this.s9,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"linux.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,50)) {if(k.KIFS(31,this.s10,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"desktop.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,51)) {if(k.KIFS(31,this.s11,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"hardware.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,52)) {if(k.KIFS(31,this.s12,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"native.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,53)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,54)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,55)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,56)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,57)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"platform-fail.");}}else if(k.KKM(e,16384,65)) {if(k.KIFS(32,this.s13,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"fr-FR.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,66)) {if(k.KIFS(32,this.s14,t)){r=m=1;k.KDC(0,t);k.KO(-1,t,"kbdfr.dll.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,67)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,68)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,69)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,70)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,71)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,72)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,73)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}else if(k.KKM(e,16384,74)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"baselayout-fail.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_027___system_stores_2.kmx b/common/test/keyboards/baseline/k_027___system_stores_2.kmx deleted file mode 100644 index dac90ab985..0000000000 Binary files a/common/test/keyboards/baseline/k_027___system_stores_2.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_028___smp.js b/common/test/keyboards/baseline/k_028___smp.js deleted file mode 100755 index 236cd0e638..0000000000 --- a/common/test/keyboards/baseline/k_028___smp.js +++ /dev/null @@ -1 +0,0 @@ -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_k_028___smp());}function Keyboard_k_028___smp(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_028___smp";this.KN="028 - smp";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KS=1;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"🙂");}}else if(k.KKM(e,16384,50)) {if(k.KFCM(1,t,['🙂'])){r=m=1;k.KDC(1,t);k.KO(-1,t,"🙂hi😀");}}else if(k.KKM(e,16384,51)) {if(k.KFCM(1,t,['😀'])){r=m=1;k.KDC(1,t);k.KO(-1,t,"x");}}else if(k.KKM(e,16384,52)) {if(k.KFCM(4,t,['🙂','h','i','x'])){r=m=1;k.KDC(4,t);k.KO(-1,t,"😁y");}}else if(k.KKM(e,16384,53)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"𐌳");r=this.g1(t,e);m=2;}}return r;};this.g1=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KFCM(1,t,['𐌳'])){m=1;k.KDC(1,t);k.KO(-1,t,"x");}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_028___smp.kmx b/common/test/keyboards/baseline/k_028___smp.kmx deleted file mode 100644 index f343f969e9..0000000000 Binary files a/common/test/keyboards/baseline/k_028___smp.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_029___beep.js b/common/test/keyboards/baseline/k_029___beep.js deleted file mode 100755 index 7862cedc62..0000000000 --- a/common/test/keyboards/baseline/k_029___beep.js +++ /dev/null @@ -1 +0,0 @@ -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_k_029___beep());}function Keyboard_k_029___beep(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_029___beep";this.KN="029 - beep";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);k.KB(t);}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_029___beep.kmx b/common/test/keyboards/baseline/k_029___beep.kmx deleted file mode 100644 index abf8b89983..0000000000 Binary files a/common/test/keyboards/baseline/k_029___beep.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0300___deadkeys.js b/common/test/keyboards/baseline/k_0300___deadkeys.js new file mode 100644 index 0000000000..0ceda69824 --- /dev/null +++ b/common/test/keyboards/baseline/k_0300___deadkeys.js @@ -0,0 +1,40 @@ + +KeymanWeb.KR(new Keyboard_k_0300___deadkeys()); + +function Keyboard_k_0300___deadkeys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0300___deadkeys"; + this.KN="0300 - deadkeys"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0010; + 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, 0x4010, 0x36)) { + if(1){ + r=m=1; // Line 13 + k.KDO(0,t,0); + } + } + else if(k.KKM(e, 0x4000, 0x41)) { + if(k.KDM(0,t,0)){ + r=m=1; // Line 15 + k.KO(0,t,"â"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_013___deadkeys.kmn b/common/test/keyboards/baseline/k_0300___deadkeys.kmn similarity index 87% rename from common/test/keyboards/baseline/k_013___deadkeys.kmn rename to common/test/keyboards/baseline/k_0300___deadkeys.kmn index d0f4876455..528a0929a0 100644 --- a/common/test/keyboards/baseline/k_013___deadkeys.kmn +++ b/common/test/keyboards/baseline/k_0300___deadkeys.kmn @@ -1,4 +1,4 @@ -store(&NAME) '013 - deadkeys' +store(&NAME) '0300 - deadkeys' c Description: Tests a simple deadkey rule in Unicode c keys: [SHIFT K_6][K_A] c expected: \u00E2 diff --git a/common/test/keyboards/baseline/k_0300___deadkeys.kmx b/common/test/keyboards/baseline/k_0300___deadkeys.kmx new file mode 100644 index 0000000000..a575f19954 Binary files /dev/null and b/common/test/keyboards/baseline/k_0300___deadkeys.kmx differ diff --git a/common/test/keyboards/baseline/k_0301___multiple_deadkeys.js b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.js new file mode 100644 index 0000000000..67b3f4987c --- /dev/null +++ b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.js @@ -0,0 +1,176 @@ + +KeymanWeb.KR(new Keyboard_k_0301___multiple_deadkeys()); + +function Keyboard_k_0301___multiple_deadkeys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0301___multiple_deadkeys"; + this.KN="0301 - multiple deadkeys"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x31)) { + if(1){ + r=m=1; // Line 22 + k.KDO(0,t,0); + } + } + else if(k.KKM(e, 0x4000, 0x32)) { + if(1){ + r=m=1; // Line 25 + k.KO(0,t,"a"); + k.KDO(-1,t,1); + } + } + else if(k.KKM(e, 0x4000, 0x33)) { + if(1){ + r=m=1; // Line 28 + k.KDO(0,t,2); + k.KO(-1,t,"a"); + } + } + else if(k.KKM(e, 0x4000, 0x34)) { + if(1){ + r=m=1; // Line 31 + k.KDO(0,t,3); + k.KDO(-1,t,4); + } + } + else if(k.KKM(e, 0x4000, 0x35)) { + if(1){ + r=m=1; // Line 34 + k.KO(0,t,"a"); + k.KDO(-1,t,5); + k.KDO(-1,t,6); + } + } + else if(k.KKM(e, 0x4000, 0x36)) { + if(1){ + r=m=1; // Line 37 + k.KO(0,t,"a"); + k.KDO(-1,t,7); + k.KDO(-1,t,8); + k.KO(-1,t,"b"); + } + } + else if(k.KKM(e, 0x4000, 0x37)) { + if(1){ + r=m=1; // Line 40 + k.KDO(0,t,9); + k.KDO(-1,t,10); + k.KO(-1,t,"a"); + } + } + else if(k.KKM(e, 0x4000, 0x38)) { + if(1){ + r=m=1; // Line 45 + k.KDO(0,t,11); + k.KDO(-1,t,12); + k.KDO(-1,t,13); + } + } + else if(k.KKM(e, 0x4000, 0x39)) { + if(1){ + r=m=1; // Line 56 + k.KO(0,t,"{"); + k.KDO(-1,t,14); + k.KDO(-1,t,15); + k.KO(-1,t,"}"); + k.KDO(-1,t,16); + k.KDO(-1,t,17); + } + } + else if(k.KKM(e, 0x4000, 0x58)) { + if(k.KCM(2,t,"{",1)&&k.KDM(1,t,14)&&k.KDM(1,t,18)&&k.KCM(1,t,"}",1)&&k.KDM(0,t,19)&&k.KDM(0,t,20)){ + r=m=1; // Line 59 + k.KO(2,t,"9=OK"); + } + else if(k.KCM(2,t,"a",1)&&k.KDM(1,t,7)&&k.KDM(1,t,8)&&k.KCM(1,t,"b",1)){ + r=m=1; // Line 38 + k.KO(2,t,"6=OK "); + } + else if(k.KDM(1,t,15)&&k.KCM(1,t,"}",1)&&k.KDM(0,t,16)&&k.KDM(0,t,17)){ + r=m=1; // Line 58 + k.KDO(1,t,18); + k.KO(-1,t,"}"); + k.KDO(-1,t,19); + k.KDO(-1,t,20); + } + else if(k.KCM(1,t,"a",1)&&k.KDM(0,t,5)&&k.KDM(0,t,6)){ + r=m=1; // Line 35 + k.KO(1,t,"5=OK "); + } + else if(k.KDM(1,t,9)&&k.KDM(1,t,10)&&k.KCM(1,t,"a",1)){ + r=m=1; // Line 41 + k.KO(1,t,"7=OK "); + } + else if(k.KDM(0,t,11)&&k.KDM(0,t,12)&&k.KDM(0,t,13)){ + r=m=1; // Line 46 + k.KO(0,t,"8=OK "); + } + else if(k.KCM(1,t,"a",1)&&k.KDM(0,t,1)){ + r=m=1; // Line 26 + k.KO(1,t,"2=OK "); + } + else if(k.KDM(1,t,2)&&k.KCM(1,t,"a",1)){ + r=m=1; // Line 29 + k.KO(1,t,"3=OK "); + } + else if(k.KDM(0,t,3)&&k.KDM(0,t,4)){ + r=m=1; // Line 32 + k.KO(0,t,"4=OK "); + } + else if(k.KDM(1,t,9)&&k.KCM(1,t,"a",1)){ + r=m=1; // Line 42 + k.KO(1,t,"7=Fail1 "); + } + else if(k.KDM(1,t,10)&&k.KCM(1,t,"a",1)){ + r=m=1; // Line 43 + k.KO(1,t,"7=Fail2 "); + } + else if(k.KDM(0,t,11)&&k.KDM(0,t,12)){ + r=m=1; // Line 50 + k.KO(0,t,"8=Fail4 "); + } + else if(k.KDM(0,t,11)&&k.KDM(0,t,13)){ + r=m=1; // Line 51 + k.KO(0,t,"8=Fail5 "); + } + else if(k.KDM(0,t,12)&&k.KDM(0,t,13)){ + r=m=1; // Line 52 + k.KO(0,t,"8=Fail6 "); + } + else if(k.KDM(0,t,0)){ + r=m=1; // Line 23 + k.KO(0,t,"1=OK "); + } + else if(k.KDM(0,t,11)){ + r=m=1; // Line 47 + k.KO(0,t,"8=Fail1 "); + } + else if(k.KDM(0,t,12)){ + r=m=1; // Line 48 + k.KO(0,t,"8=Fail2 "); + } + else if(k.KDM(0,t,13)){ + r=m=1; // Line 49 + k.KO(0,t,"8=Fail3 "); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_019___multiple_deadkeys.kmn b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmn similarity index 97% rename from common/test/keyboards/baseline/k_019___multiple_deadkeys.kmn rename to common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmn index e70b30f08c..ea7b853581 100644 --- a/common/test/keyboards/baseline/k_019___multiple_deadkeys.kmn +++ b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmn @@ -1,4 +1,4 @@ -store(&NAME) '019 - multiple deadkeys' +store(&NAME) '0301 - multiple deadkeys' c Description: Tests deadkey scenarios c 1. One deadkey in context dk(1) + '1' c 2. One char and one deadkey in context 'a' dk(2) + '2' diff --git a/common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmx b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmx new file mode 100644 index 0000000000..68804c91dd Binary files /dev/null and b/common/test/keyboards/baseline/k_0301___multiple_deadkeys.kmx differ diff --git a/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.js b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.js new file mode 100644 index 0000000000..2322275bdd --- /dev/null +++ b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.js @@ -0,0 +1,93 @@ + +KeymanWeb.KR(new Keyboard_k_0302___deadkeys_and_backspace()); + +function Keyboard_k_0302___deadkeys_and_backspace() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0302___deadkeys_and_backspace"; + this.KN="0302- deadkeys and backspace"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x08)) { + if(k.KCM(2,t,"c",1)&&k.KDM(1,t,11)&&k.KCM(1,t,"d",1)){ + r=m=1; // Line 32 + k.KO(2,t," ok"); + } + else if(k.KCM(2,t,"cd",2)){ + r=m=1; // Line 31 + k.KO(2,t," fail"); + } + } + else if(k.KKM(e, 0x4000, 0x31)) { + if(1){ + r=m=1; // Line 24 + k.KDO(0,t,0); + } + } + else if(k.KKM(e, 0x4000, 0x32)) { + if(1){ + r=m=1; // Line 25 + k.KO(0,t,"a"); + k.KDO(-1,t,1); + } + } + else if(k.KKM(e, 0x4000, 0x33)) { + if(1){ + r=m=1; // Line 26 + k.KDO(0,t,2); + k.KO(-1,t,"a"); + } + } + else if(k.KKM(e, 0x4000, 0x34)) { + if(1){ + r=m=1; // Line 27 + k.KDO(0,t,3); + k.KDO(-1,t,4); + } + } + else if(k.KKM(e, 0x4000, 0x35)) { + if(1){ + r=m=1; // Line 28 + k.KO(0,t,"a"); + k.KDO(-1,t,5); + k.KDO(-1,t,6); + k.KO(-1,t,"b"); + } + } + else if(k.KKM(e, 0x4000, 0x36)) { + if(1){ + r=m=1; // Line 29 + k.KO(0,t,"a"); + k.KDO(-1,t,7); + k.KDO(-1,t,8); + k.KO(-1,t,"b"); + k.KDO(-1,t,9); + k.KDO(-1,t,10); + } + } + else if(k.KKM(e, 0x4000, 0x37)) { + if(1){ + r=m=1; // Line 30 + k.KO(0,t,"c"); + k.KDO(-1,t,11); + k.KO(-1,t,"de"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmn b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmn similarity index 96% rename from common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmn rename to common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmn index af7c80f21d..8049e44a86 100644 --- a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmn +++ b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmn @@ -1,4 +1,4 @@ -store(&NAME) '020 - deadkeys and backspace' +store(&NAME) '0302- deadkeys and backspace' c Description: Tests deadkey backspacing c 1. One deadkey in context dk(1) + BKSP = nul c 2. One char and one deadkey in context 'a' dk(2) + BKSP = nul diff --git a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmx b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmx similarity index 87% rename from common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmx rename to common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmx index 6827116073..71e4f50f3e 100644 Binary files a/common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmx and b/common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmx differ diff --git a/common/test/keyboards/baseline/k_030___multiple_groups.js b/common/test/keyboards/baseline/k_030___multiple_groups.js deleted file mode 100755 index 4eeb812c49..0000000000 --- a/common/test/keyboards/baseline/k_030___multiple_groups.js +++ /dev/null @@ -1 +0,0 @@ -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_k_030___multiple_groups());}function Keyboard_k_030___multiple_groups(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_030___multiple_groups";this.KN="030 - multiple groups";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"a");}}else if(k.KKM(e,16384,50)) {if(k.KFCM(1,t,['b'])){r=m=1;k.KDC(1,t);k.KO(-1,t,"b");r=this.g2(t,e);m=2;}}if(m==1) {k.KDC(-1,t);r=this.g1(t,e);m=2;}return r;};this.g1=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KFCM(1,t,['a'])){m=1;k.KDC(1,t);k.KO(-1,t,"b");}return r;};this.g2=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KFCM(1,t,['b'])){m=1;k.KDC(1,t);k.KO(-1,t,"abc");}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_031___caps_lock.js b/common/test/keyboards/baseline/k_031___caps_lock.js deleted file mode 100755 index d3147ae65e..0000000000 --- a/common/test/keyboards/baseline/k_031___caps_lock.js +++ /dev/null @@ -1 +0,0 @@ -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_k_031___caps_lock());}function Keyboard_k_031___caps_lock(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_031___caps_lock";this.KN="031 - caps lock";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0310;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16896,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16640,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16384,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16912,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16656,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16400,65)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16400,66)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16384,65)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16384,66)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_031___caps_lock.kmx b/common/test/keyboards/baseline/k_031___caps_lock.kmx deleted file mode 100644 index 5fe3e4fbd7..0000000000 Binary files a/common/test/keyboards/baseline/k_031___caps_lock.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_032___caps_control.js b/common/test/keyboards/baseline/k_032___caps_control.js deleted file mode 100755 index d8afdda31d..0000000000 --- a/common/test/keyboards/baseline/k_032___caps_control.js +++ /dev/null @@ -1 +0,0 @@ -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_k_032___caps_control());}function Keyboard_k_032___caps_control(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_032___caps_control";this.KN="032 - caps control";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0310;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16912,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16656,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16896,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16640,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,52)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,52)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16896,53)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16640,53)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16896,54)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16640,54)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,55)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,55)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_032___caps_control.kmx b/common/test/keyboards/baseline/k_032___caps_control.kmx deleted file mode 100644 index 1914d1954b..0000000000 Binary files a/common/test/keyboards/baseline/k_032___caps_control.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_033___caps_always_off.js b/common/test/keyboards/baseline/k_033___caps_always_off.js deleted file mode 100755 index da223fb088..0000000000 --- a/common/test/keyboards/baseline/k_033___caps_always_off.js +++ /dev/null @@ -1 +0,0 @@ -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_k_033___caps_always_off());}function Keyboard_k_033___caps_always_off(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_033___caps_always_off";this.KN="033 - caps always off";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0300;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16640,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_033___caps_always_off.kmx b/common/test/keyboards/baseline/k_033___caps_always_off.kmx deleted file mode 100644 index cb9a71a046..0000000000 Binary files a/common/test/keyboards/baseline/k_033___caps_always_off.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_034___options_double_set_reset.js b/common/test/keyboards/baseline/k_034___options_double_set_reset.js deleted file mode 100755 index b8e2dba019..0000000000 --- a/common/test/keyboards/baseline/k_034___options_double_set_reset.js +++ /dev/null @@ -1 +0,0 @@ -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_k_034___options_double_set_reset());}function Keyboard_k_034___options_double_set_reset(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_034___options_double_set_reset";this.KN="034 - options double set reset";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="2";this.s10="3";this.s11="2";this.s12="3";this.s13="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");this.s5=this.s9;this.s5=k.KLOAD(this.KI,"foo","0");this.s5=this.s10;this.s5=k.KLOAD(this.KI,"foo","0");}else if(this.s5===this.s11){r=m=1;k.KDC(0,t);k.KO(-1,t,"bar.");}else if(this.s5===this.s12){r=m=1;k.KDC(0,t);k.KO(-1,t,"baz.");}else if(this.s5===this.s13){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_034___options_double_set_reset.kmx b/common/test/keyboards/baseline/k_034___options_double_set_reset.kmx deleted file mode 100644 index df8eb8062a..0000000000 Binary files a/common/test/keyboards/baseline/k_034___options_double_set_reset.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_035___options_double_set_staged.js b/common/test/keyboards/baseline/k_035___options_double_set_staged.js deleted file mode 100755 index 8d7f0a57a6..0000000000 --- a/common/test/keyboards/baseline/k_035___options_double_set_staged.js +++ /dev/null @@ -1 +0,0 @@ -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_k_035___options_double_set_staged());}function Keyboard_k_035___options_double_set_staged(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_035___options_double_set_staged";this.KN="035 - options double set staged";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="2";this.s10="3";this.s11="2";this.s12="3";this.s13="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");this.s5=this.s9;}else if(this.s5===this.s11){r=m=1;k.KDC(0,t);k.KO(-1,t,"bar.");}else if(this.s5===this.s12){r=m=1;k.KDC(0,t);k.KO(-1,t,"baz.");}else if(this.s5===this.s13){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}else if(k.KKM(e,16384,66)) {if(1){r=m=1;k.KDC(0,t);this.s5=k.KLOAD(this.KI,"foo","0");}}else if(k.KKM(e,16384,67)) {if(1){r=m=1;k.KDC(0,t);this.s5=this.s10;}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_035___options_double_set_staged.kmx b/common/test/keyboards/baseline/k_035___options_double_set_staged.kmx deleted file mode 100644 index e112a0740f..0000000000 Binary files a/common/test/keyboards/baseline/k_035___options_double_set_staged.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_036___options___double_reset_staged.js b/common/test/keyboards/baseline/k_036___options___double_reset_staged.js deleted file mode 100755 index 9427fcf168..0000000000 --- a/common/test/keyboards/baseline/k_036___options___double_reset_staged.js +++ /dev/null @@ -1 +0,0 @@ -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_k_036___options___double_reset_staged());}function Keyboard_k_036___options___double_reset_staged(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_036___options___double_reset_staged";this.KN="036 - options - double reset staged";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="2";this.s10="2";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");this.s5=this.s9;}else if(this.s5===this.s10){r=m=1;k.KDC(0,t);k.KO(-1,t,"bar.");}else if(this.s5===this.s11){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}else if(k.KKM(e,16384,66)) {if(1){r=m=1;k.KDC(0,t);this.s5=k.KLOAD(this.KI,"foo","0");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_037___options___double_reset.js b/common/test/keyboards/baseline/k_037___options___double_reset.js deleted file mode 100755 index a4e26a633f..0000000000 --- a/common/test/keyboards/baseline/k_037___options___double_reset.js +++ /dev/null @@ -1 +0,0 @@ -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_k_037___options___double_reset());}function Keyboard_k_037___options___double_reset(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_037___options___double_reset";this.KN="037 - options - double reset";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5=KeymanWeb.KLOAD(this.KI,"foo","0");this.s8="1";this.s9="2";this.s10="2";this.s11="0";this.KVER="16.0.138.0";this.KVS=['s5'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(this.s5===this.s8){r=m=1;k.KDC(0,t);k.KO(-1,t,"foo.");this.s5=this.s9;this.s5=k.KLOAD(this.KI,"foo","0");this.s5=k.KLOAD(this.KI,"foo","0");}else if(this.s5===this.s10){r=m=1;k.KDC(0,t);k.KO(-1,t,"bar.");}else if(this.s5===this.s11){r=m=1;k.KDC(0,t);k.KO(-1,t,"no foo.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_037___options___double_reset.kmx b/common/test/keyboards/baseline/k_037___options___double_reset.kmx deleted file mode 100644 index eed688349c..0000000000 Binary files a/common/test/keyboards/baseline/k_037___options___double_reset.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_038___punctkeys.js b/common/test/keyboards/baseline/k_038___punctkeys.js deleted file mode 100755 index 8992c4c294..0000000000 --- a/common/test/keyboards/baseline/k_038___punctkeys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_038___punctkeys());function Keyboard_k_038___punctkeys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_038___punctkeys";this.KN="038 - punctkeys";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,226)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"p");}}else if(k.KKM(e,16384,222)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"o");}}else if(k.KKM(e,16384,188)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"g");}}else if(k.KKM(e,16384,189)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"h");}}else if(k.KKM(e,16384,190)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"i");}}else if(k.KKM(e,16384,191)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"j");}}else if(k.KKM(e,16384,186)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"e");}}else if(k.KKM(e,16384,187)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"f");}}else if(k.KKM(e,16384,219)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"l");}}else if(k.KKM(e,16384,220)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"m");}}else if(k.KKM(e,16384,221)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"n");}}else if(k.KKM(e,16384,192)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"k");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_038___punctkeys.kmx b/common/test/keyboards/baseline/k_038___punctkeys.kmx deleted file mode 100644 index 8166409f5f..0000000000 Binary files a/common/test/keyboards/baseline/k_038___punctkeys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_039___generic_ctrlalt.js b/common/test/keyboards/baseline/k_039___generic_ctrlalt.js deleted file mode 100755 index 014fc69a24..0000000000 --- a/common/test/keyboards/baseline/k_039___generic_ctrlalt.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_039___generic_ctrlalt());function Keyboard_k_039___generic_ctrlalt(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_039___generic_ctrlalt";this.KN="039 - generic ctrlalt";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0060;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16416,66)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"b");}}else if(k.KKM(e,16448,67)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"c");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_039___generic_ctrlalt.kmx b/common/test/keyboards/baseline/k_039___generic_ctrlalt.kmx deleted file mode 100644 index 1bf180a31c..0000000000 Binary files a/common/test/keyboards/baseline/k_039___generic_ctrlalt.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.js b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.js new file mode 100644 index 0000000000..32aebaea24 --- /dev/null +++ b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.js @@ -0,0 +1,69 @@ + +KeymanWeb.KR(new Keyboard_k_0400___groups_and_virtual_keys()); + +function Keyboard_k_0400___groups_and_virtual_keys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0400___groups_and_virtual_keys"; + this.KN="0400 - groups and virtual keys"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0070; + this.KVS=[]; + this.gs=function(t,e) { + return this.g_UMain_0(t,e); + }; + this.gs=function(t,e) { + return this.g_UMain_0(t,e); + }; + this.g_UMain_0=function(t,e) { + var k=KeymanWeb,r=0,m=0; + if(k.KKM(e, 0x4020, 0x32)) { + if(1){ + r=m=1; // Line 16 + k.KDO(0,t,0); + } + } + else if(k.KKM(e, 0x4040, 0x32)) { + if(1){ + r=m=1; // Line 17 + k.KDO(0,t,0); + } + } + else if(k.KKM(e, 0x4010, 0x32)) { + if(1){ + r=m=1; // Line 18 + k.KDO(0,t,1); + } + } + else if(k.KKM(e, 0x4000, 0x41)) { + if(1){ + r=m=1; // Line 15 + k.KO(0,t,"α"); + } + } + if(m==1) { + + r=this.g_DK1_1(t,e); + m=2; + } + return r; + }; + this.g_DK1_1=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KDM(1,t,0)&&k.KCM(1,t,"α",1)){ + m=1; // Line 25 + k.KO(1,t,"ᾱ"); + } + else if(k.KDM(1,t,1)&&k.KCM(1,t,"α",1)){ + m=1; // Line 26 + k.KO(1,t,"ᾰ"); + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmn b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmn similarity index 92% rename from common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmn rename to common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmn index 0e32c432eb..67e63340a1 100644 --- a/common/test/keyboards/baseline/k_014___groups_and_virtual_keys.kmn +++ b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmn @@ -1,4 +1,4 @@ -store(&NAME) '014 - groups and virtual keys' +store(&NAME) '0400 - groups and virtual keys' c Description: Tests multiple groups and virtual keys with mnemonic layout c keys: [K_A][SHIFT K_2][K_A][LCTRL K_2][K_A] c expected: \u03B1\u1FB0\u1FB1 diff --git a/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmx b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmx new file mode 100644 index 0000000000..c0ab17f657 Binary files /dev/null and b/common/test/keyboards/baseline/k_0400___groups_and_virtual_keys.kmx differ diff --git a/common/test/keyboards/baseline/k_0401___multiple_groups.js b/common/test/keyboards/baseline/k_0401___multiple_groups.js new file mode 100644 index 0000000000..12bc00f9e6 --- /dev/null +++ b/common/test/keyboards/baseline/k_0401___multiple_groups.js @@ -0,0 +1,73 @@ +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_k_0401___multiple_groups()); +} +function Keyboard_k_0401___multiple_groups() +{ + 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_k_0401___multiple_groups"; + this.KN="401 - multiple groups"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + 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_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KO(-1,t,"a"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(k.KFCM(1,t,['b'])){ + r=m=1; // Line 14 + k.KDC(1,t); + k.KO(-1,t,"b"); + r=this.g_b_2(t,e); + m=2; + } + } + if(m==1) { + + k.KDC(-1,t); + r=this.g_a_1(t,e); + m=2; + } + return r; + }; + this.g_a_1=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KFCM(1,t,['a'])){ + m=1; // Line 20 + k.KDC(1,t); + k.KO(-1,t,"b"); + } + return r; + }; + this.g_b_2=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KFCM(1,t,['b'])){ + m=1; // Line 24 + k.KDC(1,t); + k.KO(-1,t,"abc"); + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_030___multiple_groups.kmn b/common/test/keyboards/baseline/k_0401___multiple_groups.kmn similarity index 90% rename from common/test/keyboards/baseline/k_030___multiple_groups.kmn rename to common/test/keyboards/baseline/k_0401___multiple_groups.kmn index b9148827bc..87097387aa 100644 --- a/common/test/keyboards/baseline/k_030___multiple_groups.kmn +++ b/common/test/keyboards/baseline/k_0401___multiple_groups.kmn @@ -1,4 +1,4 @@ -store(&NAME) "030 - multiple groups" +store(&NAME) "401 - multiple groups" c Description: Tests multiple groups. Purpose here is to interleave output and backspaces from kmx processor to consumer c keys: [K_1][K_2] c expected: abc diff --git a/common/test/keyboards/baseline/k_030___multiple_groups.kmx b/common/test/keyboards/baseline/k_0401___multiple_groups.kmx similarity index 67% rename from common/test/keyboards/baseline/k_030___multiple_groups.kmx rename to common/test/keyboards/baseline/k_0401___multiple_groups.kmx index e27ee4dd08..415a932ccb 100644 Binary files a/common/test/keyboards/baseline/k_030___multiple_groups.kmx and b/common/test/keyboards/baseline/k_0401___multiple_groups.kmx differ diff --git a/common/test/keyboards/baseline/k_0402___output_and_keystroke.js b/common/test/keyboards/baseline/k_0402___output_and_keystroke.js new file mode 100644 index 0000000000..aa1e890329 --- /dev/null +++ b/common/test/keyboards/baseline/k_0402___output_and_keystroke.js @@ -0,0 +1,87 @@ +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_k_0402___output_and_keystroke()); +} +function Keyboard_k_0402___output_and_keystroke() +{ + 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_k_0402___output_and_keystroke"; + this.KN="0402 - output and keystroke"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + 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_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KO(-1,t,"a"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(k.KFCM(1,t,['b'])){ + r=m=1; // Line 14 + k.KDC(1,t); + k.KO(-1,t,"b"); + r=this.g_b_2(t,e); + m=2; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(k.KFCM(3,t,['a','b','c'])){ + r=m=1; // Line 15 + k.KDC(3,t); + k.KO(-1,t,"a"); + k.KO(-1,t,"bd"); + r=this.g_emit_3(t,e); + m=2; + } + } + if(m==1) { + + k.KDC(-1,t); + r=this.g_a_1(t,e); + m=2; + } + return r; + }; + this.g_a_1=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KFCM(1,t,['a'])){ + m=1; // Line 21 + k.KDC(1,t); + k.KO(-1,t,"b"); + } + return r; + }; + this.g_b_2=function(t,e) { + var k=KeymanWeb,r=1,m=0; + if(k.KFCM(1,t,['b'])){ + m=1; // Line 25 + k.KDC(1,t); + k.KO(-1,t,"abc"); + } + return r; + }; + this.g_emit_3=function(t,e) { + var k=KeymanWeb,r=0,m=0; + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_043___output_and_keystroke.kmn b/common/test/keyboards/baseline/k_0402___output_and_keystroke.kmn similarity index 90% rename from common/test/keyboards/baseline/k_043___output_and_keystroke.kmn rename to common/test/keyboards/baseline/k_0402___output_and_keystroke.kmn index 4c6409c1c7..dd8df42184 100644 --- a/common/test/keyboards/baseline/k_043___output_and_keystroke.kmn +++ b/common/test/keyboards/baseline/k_0402___output_and_keystroke.kmn @@ -1,4 +1,4 @@ -store(&NAME) '043 - output and keystroke' +store(&NAME) '0402 - output and keystroke' c Description: Tests the 'emit default key' function by having an empty 'using keys' final group c keys: [K_1][K_2][K_3] c expected: abd3 diff --git a/common/test/keyboards/baseline/k_0402___output_and_keystroke.kmx b/common/test/keyboards/baseline/k_0402___output_and_keystroke.kmx new file mode 100644 index 0000000000..a6a883d2fd Binary files /dev/null and b/common/test/keyboards/baseline/k_0402___output_and_keystroke.kmx differ diff --git a/common/test/keyboards/baseline/k_040___long_context.js b/common/test/keyboards/baseline/k_040___long_context.js deleted file mode 100755 index 39d43abebc..0000000000 --- a/common/test/keyboards/baseline/k_040___long_context.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_040___long_context());function Keyboard_k_040___long_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_040___long_context";this.KN="040 - long context";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,32)) {if(1){r=m=1;k.KO(0,t," ");}}else if(k.KKM(e,16384,70)) {if(k.KCM(1,t," ",1)){r=m=1;k.KO(1,t," ");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_040___long_context.kmx b/common/test/keyboards/baseline/k_040___long_context.kmx deleted file mode 100644 index 55a88a77ab..0000000000 Binary files a/common/test/keyboards/baseline/k_040___long_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.js b/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.js deleted file mode 100755 index 86542bbac7..0000000000 --- a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_041___long_context_and_deadkeys());function Keyboard_k_041___long_context_and_deadkeys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_041___long_context_and_deadkeys";this.KN="041 - long context and deadkeys";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(k.KDM(60,t,0)&&k.KCM(60,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh",60)){r=m=1;k.KO(-1,t,"1");}}else if(k.KKM(e,16384,50)) {if(k.KCM(63,t,"\x08\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",63)){r=m=1;k.KO(63,t,"FAIL TEST 2");}else if(k.KCM(62,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",62)){r=m=1;k.KO(62,t,"FAIL TEST 2");}else if(k.KCM(61,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",61)){r=m=1;k.KO(-1,t,"2");}}else if(k.KKM(e,16384,51)) {if(k.KCM(64,t,"\x08\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",64)){r=m=1;k.KO(64,t,"FAIL TEST 3");}else if(k.KCM(63,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",63)){r=m=1;k.KO(63,t,"FAIL TEST 3");}else if(k.KCM(62,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",62)){r=m=1;k.KO(62,t,"abcdefghijklmnopqrstuvwxyz123");}}else if(k.KKM(e,16384,52)) {if(k.KDM(29,t,0)&&k.KCM(29,t,"abcdefghijklmnopqrstuvwxyz123",29)){r=m=1;k.KO(29,t,"PASS");}}else if(k.KKM(e,16384,90)) {if(1){r=m=1;k.KDO(0,t,0);k.KO(-1,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmx b/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmx deleted file mode 100644 index de2b1d5020..0000000000 Binary files a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.js b/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.js deleted file mode 100755 index da7e2138ff..0000000000 --- a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_042___long_context_and_split_deadkeys());function Keyboard_k_042___long_context_and_split_deadkeys(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_042___long_context_and_split_deadkeys";this.KN="042 - long context and split deadkeys";this.KMINVER="6.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,32)) {if(k.KCM(64,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk",64)){r=m=1;k.KO(64,t,"FAIL");}else if(k.KDM(63,t,0)&&k.KCM(63,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk",63)){r=m=1;k.KO(63,t,"UNEXPECTED");}}else if(k.KKM(e,16384,49)) {if(k.KCM(61,t,"defghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk ",61)){r=m=1;k.KO(61,t,"def");}}else if(k.KKM(e,16384,50)) {if(k.KDM(6,t,0)&&k.KCM(6,t,"abcdef",6)){r=m=1;k.KO(6,t,"PASS");}}else if(k.KKM(e,16384,90)) {if(1){r=m=1;k.KDO(0,t,0);k.KO(-1,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmx b/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmx deleted file mode 100644 index fbe552d53b..0000000000 Binary files a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_043___output_and_keystroke.js b/common/test/keyboards/baseline/k_043___output_and_keystroke.js deleted file mode 100755 index 3e6941c7db..0000000000 --- a/common/test/keyboards/baseline/k_043___output_and_keystroke.js +++ /dev/null @@ -1 +0,0 @@ -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_k_043___output_and_keystroke());}function Keyboard_k_043___output_and_keystroke(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_043___output_and_keystroke";this.KN="043 - output and keystroke";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"a");}}else if(k.KKM(e,16384,50)) {if(k.KFCM(1,t,['b'])){r=m=1;k.KDC(1,t);k.KO(-1,t,"b");r=this.g2(t,e);m=2;}}else if(k.KKM(e,16384,51)) {if(k.KFCM(3,t,['a','b','c'])){r=m=1;k.KDC(3,t);k.KO(-1,t,"a");k.KO(-1,t,"bd");r=this.g3(t,e);m=2;}}if(m==1) {k.KDC(-1,t);r=this.g1(t,e);m=2;}return r;};this.g1=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KFCM(1,t,['a'])){m=1;k.KDC(1,t);k.KO(-1,t,"b");}return r;};this.g2=function(t,e) {var k=KeymanWeb,r=1,m=0;if(k.KFCM(1,t,['b'])){m=1;k.KDC(1,t);k.KO(-1,t,"abc");}return r;};this.g3=function(t,e) {var k=KeymanWeb,r=0,m=0;return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_043___output_and_keystroke.kmx b/common/test/keyboards/baseline/k_043___output_and_keystroke.kmx deleted file mode 100644 index a25aae26a6..0000000000 Binary files a/common/test/keyboards/baseline/k_043___output_and_keystroke.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_044___if_and_context.js b/common/test/keyboards/baseline/k_044___if_and_context.js deleted file mode 100755 index c08dc3c67c..0000000000 --- a/common/test/keyboards/baseline/k_044___if_and_context.js +++ /dev/null @@ -1 +0,0 @@ -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_k_044___if_and_context());}function Keyboard_k_044___if_and_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_044___if_and_context";this.KN="044 - if and context";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s6=KeymanWeb.KLOAD(this.KI,"nfc","0");this.s7="ae";this.s9="0";this.KVER="16.0.138.0";this.KVS=['s6'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"exay");}}else if(k.KKM(e,16384,66)) {if(k.KFCM(4,t,[{t:'a',a:this.s7},'x',{t:'a',a:this.s7},'y'])&&this.s6===this.s9){r=m=1;k.KDC(4,t);k.KIO(-1,this.s7,1,t);k.KO(-1,t,"x");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_044___if_and_context.kmx b/common/test/keyboards/baseline/k_044___if_and_context.kmx deleted file mode 100644 index 60c0c6300a..0000000000 Binary files a/common/test/keyboards/baseline/k_044___if_and_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_045___deadkey_and_context.js b/common/test/keyboards/baseline/k_045___deadkey_and_context.js deleted file mode 100755 index 750277ccbe..0000000000 --- a/common/test/keyboards/baseline/k_045___deadkey_and_context.js +++ /dev/null @@ -1 +0,0 @@ -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_k_045___deadkey_and_context());}function Keyboard_k_045___deadkey_and_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_045___deadkey_and_context";this.KN="045 - deadkey and context";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,191)) {if(k.KFCM(7,t,['<',{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2},'>'])){r=m=1;k.KDC(7,t);k.KO(-1,t,"correct");}}else if(k.KKM(e,16384,89)) {if(1){r=m=1;k.KDC(0,t);k.KDO(-1,t,0);k.KO(-1,t,"a");k.KDO(-1,t,1);k.KO(-1,t,"b");k.KDO(-1,t,2);}}else if(k.KKM(e,16384,90)) {if(k.KFCM(5,t,[{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2}])){r=m=1;k.KDC(5,t);k.KO(-1,t,"<");k.KDO(-1,t,0);k.KO(-1,t,"a");k.KDO(-1,t,1);k.KO(-1,t,"b");k.KDO(-1,t,2);k.KO(-1,t,">");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_045___deadkey_and_context.kmx b/common/test/keyboards/baseline/k_045___deadkey_and_context.kmx deleted file mode 100644 index 4b1e3bfb2a..0000000000 Binary files a/common/test/keyboards/baseline/k_045___deadkey_and_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.js b/common/test/keyboards/baseline/k_046___deadkey_and_contextex.js deleted file mode 100755 index 45dc72f186..0000000000 --- a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.js +++ /dev/null @@ -1 +0,0 @@ -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_k_046___deadkey_and_contextex());}function Keyboard_k_046___deadkey_and_contextex(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_046___deadkey_and_contextex";this.KN="046 - deadkey and contextex";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,191)) {if(k.KFCM(3,t,['<',{t:'d',d:0},'>'])){r=m=1;k.KDC(3,t);k.KO(-1,t,"correct");}}else if(k.KKM(e,16400,77)) {if(k.KFCM(5,t,[{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2}])){r=m=1;k.KDC(5,t);k.KO(-1,t,"<");k.KDO(-1,t,0);k.KO(-1,t,">");}}else if(k.KKM(e,16384,89)) {if(1){r=m=1;k.KDC(0,t);k.KDO(-1,t,0);k.KO(-1,t,"a");k.KDO(-1,t,1);k.KO(-1,t,"b");k.KDO(-1,t,2);}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmx b/common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmx deleted file mode 100644 index 618eefbf27..0000000000 Binary files a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.js b/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.js deleted file mode 100755 index 3775e99174..0000000000 --- a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.js +++ /dev/null @@ -1 +0,0 @@ -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_k_047___caps_always_off_initially_on());}function Keyboard_k_047___caps_always_off_initially_on(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_047___caps_always_off_initially_on";this.KN="047 - caps always off initially on";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0300;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16640,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,49)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,50)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}else if(k.KKM(e,16640,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"fail.");}}else if(k.KKM(e,16896,51)) {if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"pass.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmx b/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmx deleted file mode 100644 index 301fcddc04..0000000000 Binary files a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.js b/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.js deleted file mode 100755 index 5b171674cf..0000000000 --- a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.js +++ /dev/null @@ -1 +0,0 @@ -KeymanWeb.KR(new Keyboard_k_048___modifier_keys_keep_context());function Keyboard_k_048___modifier_keys_keep_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_048___modifier_keys_keep_context";this.KN="048 - modifier keys keep context";this.KMINVER="9.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,65)) {if(1){r=m=1;k.KO(0,t,"a");}}else if(k.KKM(e,16384,66)) {if(k.KCM(1,t,"a",1)){r=m=1;k.KO(1,t,"pass.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmx b/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmx deleted file mode 100644 index 98ca5a6dbe..0000000000 Binary files a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_049___enter_invalidates_context.js b/common/test/keyboards/baseline/k_049___enter_invalidates_context.js deleted file mode 100755 index fdc476f891..0000000000 --- a/common/test/keyboards/baseline/k_049___enter_invalidates_context.js +++ /dev/null @@ -1 +0,0 @@ -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_k_049___enter_invalidates_context());}function Keyboard_k_049___enter_invalidates_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_049___enter_invalidates_context";this.KN="049 - enter_invalidates_context";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,67)) {if(k.KFCM(2,t,['a','b'])){r=m=1;k.KDC(2,t);k.KO(-1,t,"abd");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_049___enter_invalidates_context.kmx b/common/test/keyboards/baseline/k_049___enter_invalidates_context.kmx deleted file mode 100644 index 916a4a4662..0000000000 Binary files a/common/test/keyboards/baseline/k_049___enter_invalidates_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0500___options.js b/common/test/keyboards/baseline/k_0500___options.js new file mode 100644 index 0000000000..a9eb29cc71 --- /dev/null +++ b/common/test/keyboards/baseline/k_0500___options.js @@ -0,0 +1,64 @@ +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_k_0500___options()); +} +function Keyboard_k_0500___options() +{ + 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_k_0500___options"; + this.KN="0500 - options"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="0"; + this.s9="1"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + this.s_foo_4=this.s10; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 17 + k.KDC(0,t); + this.s_foo_4=this.s9; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(this.s_foo_4===this.s7){ + r=m=1; // Line 15 + k.KDC(0,t); + k.KO(-1,t,"foo."); + } + else if(this.s_foo_4===this.s8){ + r=m=1; // Line 16 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_021___options.kmn b/common/test/keyboards/baseline/k_0500___options.kmn similarity index 88% rename from common/test/keyboards/baseline/k_021___options.kmn rename to common/test/keyboards/baseline/k_0500___options.kmn index 3851896b84..428168cadb 100644 --- a/common/test/keyboards/baseline/k_021___options.kmn +++ b/common/test/keyboards/baseline/k_0500___options.kmn @@ -1,8 +1,8 @@ -store(&NAME) '021 - options' +store(&NAME) '0500 - options' c Description: Tests basic option rules c keys: [K_A][K_1][K_A][K_0][K_A] c expected: no foo.foo.no foo. -c context: +c context: store(&version) '10.0' diff --git a/common/test/keyboards/baseline/k_0500___options.kmx b/common/test/keyboards/baseline/k_0500___options.kmx new file mode 100644 index 0000000000..df17de841b Binary files /dev/null and b/common/test/keyboards/baseline/k_0500___options.kmx differ diff --git a/common/test/keyboards/baseline/k_0501___options_with_preset.js b/common/test/keyboards/baseline/k_0501___options_with_preset.js new file mode 100644 index 0000000000..bf48622b98 --- /dev/null +++ b/common/test/keyboards/baseline/k_0501___options_with_preset.js @@ -0,0 +1,66 @@ +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_k_0501___options_with_preset()); +} +function Keyboard_k_0501___options_with_preset() +{ + 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_k_0501___options_with_preset"; + this.KN="0501 - options with preset"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="0"; + this.s9="1"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + this.s_foo_4=this.s10; + k.KSAVE("foo",this.s_foo_4); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + this.s_foo_4=this.s9; + k.KSAVE("foo",this.s_foo_4); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(this.s_foo_4===this.s7){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"foo."); + } + else if(this.s_foo_4===this.s8){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_022___options_with_preset.kmn b/common/test/keyboards/baseline/k_0501___options_with_preset.kmn similarity index 88% rename from common/test/keyboards/baseline/k_022___options_with_preset.kmn rename to common/test/keyboards/baseline/k_0501___options_with_preset.kmn index dbaad6e63c..98184fca34 100644 --- a/common/test/keyboards/baseline/k_022___options_with_preset.kmn +++ b/common/test/keyboards/baseline/k_0501___options_with_preset.kmn @@ -1,8 +1,8 @@ -store(&NAME) '022 - options with preset' +store(&NAME) '0501 - options with preset' c Description: Tests basic option rules with a preset supplied c keys: [K_A][K_1][K_A][K_0][K_A] c expected: foo.foo.no foo. -c context: +c context: c option: foo=1 c expected option: foo=0 c saved option: foo=0 diff --git a/common/test/keyboards/baseline/k_0501___options_with_preset.kmx b/common/test/keyboards/baseline/k_0501___options_with_preset.kmx new file mode 100644 index 0000000000..0ed8c43f5e Binary files /dev/null and b/common/test/keyboards/baseline/k_0501___options_with_preset.kmx differ diff --git a/common/test/keyboards/baseline/k_0502___options_with_save.js b/common/test/keyboards/baseline/k_0502___options_with_save.js new file mode 100644 index 0000000000..26c4fa041b --- /dev/null +++ b/common/test/keyboards/baseline/k_0502___options_with_save.js @@ -0,0 +1,71 @@ +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_k_0502___options_with_save()); +} +function Keyboard_k_0502___options_with_save() +{ + 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_k_0502___options_with_save"; + this.KN="0502 - options with save"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="0"; + this.s9="1"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + this.s_foo_4=this.s10; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 19 + k.KDC(0,t); + this.s_foo_4=this.s9; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KSAVE("foo",this.s_foo_4); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + } + else if(this.s_foo_4===this.s8){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_023___options_with_save.kmn b/common/test/keyboards/baseline/k_0502___options_with_save.kmn similarity index 88% rename from common/test/keyboards/baseline/k_023___options_with_save.kmn rename to common/test/keyboards/baseline/k_0502___options_with_save.kmn index 913bea076f..987b30055c 100644 --- a/common/test/keyboards/baseline/k_023___options_with_save.kmn +++ b/common/test/keyboards/baseline/k_0502___options_with_save.kmn @@ -1,8 +1,8 @@ -store(&NAME) '023 - options with save' +store(&NAME) '0502 - options with save' c Description: Tests basic option rules with save c keys: [K_A][K_1][K_A][K_0][K_A][K_2] c expected: no foo.foo.no foo. -c context: +c context: c expected option: foo=0 c saved option: foo=0 diff --git a/common/test/keyboards/baseline/k_0502___options_with_save.kmx b/common/test/keyboards/baseline/k_0502___options_with_save.kmx new file mode 100644 index 0000000000..5277a9c6e3 Binary files /dev/null and b/common/test/keyboards/baseline/k_0502___options_with_save.kmx differ diff --git a/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.js b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.js new file mode 100644 index 0000000000..0ce89bd875 --- /dev/null +++ b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.js @@ -0,0 +1,72 @@ +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_k_0503___options_with_save_and_preset()); +} +function Keyboard_k_0503___options_with_save_and_preset() +{ + 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_k_0503___options_with_save_and_preset"; + this.KN="0503 - options with save and preset"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="0"; + this.s9="1"; + this.s10="0"; + this.s11="0"; + this.KVS=['s_foo_4']; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + this.s_foo_4=this.s10; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + this.s_foo_4=this.s9; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(this.s_foo_4===this.s11){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KSAVE("foo",this.s_foo_4); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(this.s_foo_4===this.s7){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"foo."); + } + else if(this.s_foo_4===this.s8){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmn b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmn similarity index 86% rename from common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmn rename to common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmn index 0c3004c3e3..9688ed8e61 100644 --- a/common/test/keyboards/baseline/k_024___options_with_save_and_preset.kmn +++ b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmn @@ -1,8 +1,8 @@ -store(&NAME) '024 - options with save and preset' +store(&NAME) '0503 - options with save and preset' c Description: Tests basic option rules with save c keys: [K_A][K_1][K_A][K_0][K_A][K_2] c expected: foo.foo.no foo. -c context: +c context: c option: foo=1 c expected option: foo=0 c saved option: foo=0 diff --git a/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmx b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmx new file mode 100644 index 0000000000..49b55208b6 Binary files /dev/null and b/common/test/keyboards/baseline/k_0503___options_with_save_and_preset.kmx differ diff --git a/common/test/keyboards/baseline/k_0504___options_with_reset.js b/common/test/keyboards/baseline/k_0504___options_with_reset.js new file mode 100644 index 0000000000..5cb7dc19ae --- /dev/null +++ b/common/test/keyboards/baseline/k_0504___options_with_reset.js @@ -0,0 +1,71 @@ +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_k_0504___options_with_reset()); +} +function Keyboard_k_0504___options_with_reset() +{ + 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_k_0504___options_with_reset"; + this.KN="0504 - options with reset"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="0"; + this.s9="1"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + this.s_foo_4=this.s10; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 19 + k.KDC(0,t); + this.s_foo_4=this.s9; + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + } + else if(this.s_foo_4===this.s8){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_025___options_with_reset.kmn b/common/test/keyboards/baseline/k_0504___options_with_reset.kmn similarity index 87% rename from common/test/keyboards/baseline/k_025___options_with_reset.kmn rename to common/test/keyboards/baseline/k_0504___options_with_reset.kmn index 13a0d69283..caeb29c25d 100644 --- a/common/test/keyboards/baseline/k_025___options_with_reset.kmn +++ b/common/test/keyboards/baseline/k_0504___options_with_reset.kmn @@ -1,8 +1,8 @@ -store(&NAME) '025 - options with reset' +store(&NAME) '0504 - options with reset' c Description: Tests basic option rules with reset c keys: [K_A][K_1][K_A][K_0][K_A][K_3] c expected: foo.foo.no foo. -c context: +c context: c option: foo=1 c expected option: foo=1 diff --git a/common/test/keyboards/baseline/k_0504___options_with_reset.kmx b/common/test/keyboards/baseline/k_0504___options_with_reset.kmx new file mode 100644 index 0000000000..413060deca Binary files /dev/null and b/common/test/keyboards/baseline/k_0504___options_with_reset.kmx differ diff --git a/common/test/keyboards/baseline/k_0505___options_double_set_reset.js b/common/test/keyboards/baseline/k_0505___options_double_set_reset.js new file mode 100644 index 0000000000..7e89315cda --- /dev/null +++ b/common/test/keyboards/baseline/k_0505___options_double_set_reset.js @@ -0,0 +1,66 @@ +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_k_0505___options_double_set_reset()); +} +function Keyboard_k_0505___options_double_set_reset() +{ + 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_k_0505___options_double_set_reset"; + this.KN="0505 - options double set reset"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="2"; + this.s9="3"; + this.s10="2"; + this.s11="3"; + this.s12="0"; + this.KVS=['s_foo_4']; + 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(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + this.s_foo_4=this.s8; + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + this.s_foo_4=this.s9; + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + } + else if(this.s_foo_4===this.s10){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"bar."); + } + else if(this.s_foo_4===this.s11){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"baz."); + } + else if(this.s_foo_4===this.s12){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_034___options_double_set_reset.kmn b/common/test/keyboards/baseline/k_0505___options_double_set_reset.kmn similarity index 87% rename from common/test/keyboards/baseline/k_034___options_double_set_reset.kmn rename to common/test/keyboards/baseline/k_0505___options_double_set_reset.kmn index 3fe9225eca..e91f95e26b 100644 --- a/common/test/keyboards/baseline/k_034___options_double_set_reset.kmn +++ b/common/test/keyboards/baseline/k_0505___options_double_set_reset.kmn @@ -1,8 +1,8 @@ -store(&NAME) '034 - options double set reset' +store(&NAME) '0505 - options double set reset' c Description: Tests basic option rules with save reset+set+reset c keys: [K_A][K_A] c expected: foo.foo. -c context: +c context: c option: foo=1 c expected option: foo=1 diff --git a/common/test/keyboards/baseline/k_0505___options_double_set_reset.kmx b/common/test/keyboards/baseline/k_0505___options_double_set_reset.kmx new file mode 100644 index 0000000000..f44ef699c0 Binary files /dev/null and b/common/test/keyboards/baseline/k_0505___options_double_set_reset.kmx differ diff --git a/common/test/keyboards/baseline/k_0506___options_double_set_staged.js b/common/test/keyboards/baseline/k_0506___options_double_set_staged.js new file mode 100644 index 0000000000..d0e5bb58ff --- /dev/null +++ b/common/test/keyboards/baseline/k_0506___options_double_set_staged.js @@ -0,0 +1,77 @@ +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_k_0506___options_double_set_staged()); +} +function Keyboard_k_0506___options_double_set_staged() +{ + 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_k_0506___options_double_set_staged"; + this.KN="0506 - options double set staged"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="2"; + this.s9="3"; + this.s10="2"; + this.s11="3"; + this.s12="0"; + this.KVS=['s_foo_4']; + 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(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + this.s_foo_4=this.s8; + } + else if(this.s_foo_4===this.s10){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"bar."); + } + else if(this.s_foo_4===this.s11){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"baz."); + } + else if(this.s_foo_4===this.s12){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_C /* 0x43 */)) { + if(1){ + r=m=1; // Line 19 + k.KDC(0,t); + this.s_foo_4=this.s9; + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_035___options_double_set_staged.kmn b/common/test/keyboards/baseline/k_0506___options_double_set_staged.kmn similarity index 90% rename from common/test/keyboards/baseline/k_035___options_double_set_staged.kmn rename to common/test/keyboards/baseline/k_0506___options_double_set_staged.kmn index 75d1b81b89..c78bee2fcf 100644 --- a/common/test/keyboards/baseline/k_035___options_double_set_staged.kmn +++ b/common/test/keyboards/baseline/k_0506___options_double_set_staged.kmn @@ -1,4 +1,4 @@ -store(&NAME) '035 - options double set staged' +store(&NAME) '0506 - options double set staged' c Description: Tests basic option rules with save reset+set+reset c keys: [K_A][K_B][K_C][K_B][K_A] c expected: foo.foo. diff --git a/common/test/keyboards/baseline/k_0506___options_double_set_staged.kmx b/common/test/keyboards/baseline/k_0506___options_double_set_staged.kmx new file mode 100644 index 0000000000..c6f03efa7c Binary files /dev/null and b/common/test/keyboards/baseline/k_0506___options_double_set_staged.kmx differ diff --git a/common/test/keyboards/baseline/k_0507___options___double_reset_staged.js b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.js new file mode 100644 index 0000000000..754fd8ae65 --- /dev/null +++ b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.js @@ -0,0 +1,63 @@ +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_k_0507___options___double_reset_staged()); +} +function Keyboard_k_0507___options___double_reset_staged() +{ + 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_k_0507___options___double_reset_staged"; + this.KN="0507- options - double reset staged"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="2"; + this.s9="2"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + this.s_foo_4=this.s8; + } + else if(this.s_foo_4===this.s9){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"bar."); + } + else if(this.s_foo_4===this.s10){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_036___options___double_reset_staged.kmn b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmn similarity index 88% rename from common/test/keyboards/baseline/k_036___options___double_reset_staged.kmn rename to common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmn index 53157b487d..e250695af1 100644 --- a/common/test/keyboards/baseline/k_036___options___double_reset_staged.kmn +++ b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmn @@ -1,4 +1,4 @@ -store(&NAME) '036 - options - double reset staged' +store(&NAME) '0507- options - double reset staged' c Description: Tests basic option rules with save reset+reset c keys: [K_A][K_B][K_B][K_A] c expected: foo.foo. diff --git a/common/test/keyboards/baseline/k_036___options___double_reset_staged.kmx b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmx similarity index 79% rename from common/test/keyboards/baseline/k_036___options___double_reset_staged.kmx rename to common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmx index ccb05e04c1..2aba8f9cdb 100644 Binary files a/common/test/keyboards/baseline/k_036___options___double_reset_staged.kmx and b/common/test/keyboards/baseline/k_0507___options___double_reset_staged.kmx differ diff --git a/common/test/keyboards/baseline/k_0508___options___double_reset.js b/common/test/keyboards/baseline/k_0508___options___double_reset.js new file mode 100644 index 0000000000..9f208eaaaf --- /dev/null +++ b/common/test/keyboards/baseline/k_0508___options___double_reset.js @@ -0,0 +1,58 @@ +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_k_0508___options___double_reset()); +} +function Keyboard_k_0508___options___double_reset() +{ + 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_k_0508___options___double_reset"; + this.KN="0508 - options - double reset"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_foo_4=KeymanWeb.KLOAD(this.KI,"foo","0"); + this.s7="1"; + this.s8="2"; + this.s9="2"; + this.s10="0"; + this.KVS=['s_foo_4']; + 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(this.s_foo_4===this.s7){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"foo."); + this.s_foo_4=this.s8; + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + this.s_foo_4=k.KLOAD(this.KI,"foo","0"); + } + else if(this.s_foo_4===this.s9){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"bar."); + } + else if(this.s_foo_4===this.s10){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"no foo."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_037___options___double_reset.kmn b/common/test/keyboards/baseline/k_0508___options___double_reset.kmn similarity index 86% rename from common/test/keyboards/baseline/k_037___options___double_reset.kmn rename to common/test/keyboards/baseline/k_0508___options___double_reset.kmn index 05e5fe7b02..766cf5f87c 100644 --- a/common/test/keyboards/baseline/k_037___options___double_reset.kmn +++ b/common/test/keyboards/baseline/k_0508___options___double_reset.kmn @@ -1,8 +1,8 @@ -store(&NAME) '037 - options - double reset' +store(&NAME) '0508 - options - double reset' c Description: Tests basic option rules with save reset+reset c keys: [K_A][K_A] c expected: foo.foo. -c context: +c context: c option: foo=1 c expected option: foo=1 diff --git a/common/test/keyboards/baseline/k_0508___options___double_reset.kmx b/common/test/keyboards/baseline/k_0508___options___double_reset.kmx new file mode 100644 index 0000000000..f34e800c02 Binary files /dev/null and b/common/test/keyboards/baseline/k_0508___options___double_reset.kmx differ diff --git a/common/test/keyboards/baseline/k_050___nul_and_context.js b/common/test/keyboards/baseline/k_050___nul_and_context.js deleted file mode 100755 index 4d29aa6685..0000000000 --- a/common/test/keyboards/baseline/k_050___nul_and_context.js +++ /dev/null @@ -1 +0,0 @@ -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_k_050___nul_and_context());}function Keyboard_k_050___nul_and_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_050___nul_and_context";this.KN="050 - nul_and_context";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="mnpqrstv";this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,66)) {if(k.KFCM(2,t,[{t:'n'},{t:'a',a:this.s5}])){r=m=1;k.KDC(1,t);k.KO(-1,t,"2");k.KIO(-1,this.s5,1,t);k.KO(-1,t,"3");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_050___nul_and_context.kmx b/common/test/keyboards/baseline/k_050___nul_and_context.kmx deleted file mode 100644 index a777f48e2c..0000000000 Binary files a/common/test/keyboards/baseline/k_050___nul_and_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_051___if_and_context.js b/common/test/keyboards/baseline/k_051___if_and_context.js deleted file mode 100755 index b43ca031c4..0000000000 --- a/common/test/keyboards/baseline/k_051___if_and_context.js +++ /dev/null @@ -1 +0,0 @@ -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_k_051___if_and_context());}function Keyboard_k_051___if_and_context(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_051___if_and_context";this.KN="051 - if_and_context";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="mnpqrstv";this.s6=KeymanWeb.KLOAD(this.KI,"ifx","1");this.s9="1";this.KVER="16.0.138.0";this.KVS=['s6'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,68)) {if(k.KFCM(1,t,[{t:'a',a:this.s5}])&&this.s6===this.s9){r=m=1;k.KDC(1,t);k.KO(-1,t,"4");k.KIO(-1,this.s5,1,t);k.KO(-1,t,"5");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_051___if_and_context.kmx b/common/test/keyboards/baseline/k_051___if_and_context.kmx deleted file mode 100644 index facfe91859..0000000000 Binary files a/common/test/keyboards/baseline/k_051___if_and_context.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_052___nul_and_index.js b/common/test/keyboards/baseline/k_052___nul_and_index.js deleted file mode 100755 index 1094d1b56a..0000000000 --- a/common/test/keyboards/baseline/k_052___nul_and_index.js +++ /dev/null @@ -1 +0,0 @@ -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_k_052___nul_and_index());}function Keyboard_k_052___nul_and_index(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_052___nul_and_index";this.KN="052 - nul_and_index";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="mnpqrstv";this.s6="MNPQRSTV";this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,66)) {if(k.KFCM(2,t,[{t:'n'},{t:'a',a:this.s5}])){r=m=1;k.KDC(1,t);k.KO(-1,t,"2");k.KIO(-1,this.s6,1,t);k.KO(-1,t,"3");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_052___nul_and_index.kmx b/common/test/keyboards/baseline/k_052___nul_and_index.kmx deleted file mode 100644 index 7e533db791..0000000000 Binary files a/common/test/keyboards/baseline/k_052___nul_and_index.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_053___if_and_index.js b/common/test/keyboards/baseline/k_053___if_and_index.js deleted file mode 100755 index eb1710226b..0000000000 --- a/common/test/keyboards/baseline/k_053___if_and_index.js +++ /dev/null @@ -1 +0,0 @@ -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_k_053___if_and_index());}function Keyboard_k_053___if_and_index(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_053___if_and_index";this.KN="053 - if_and_index";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0000;this.s5="mnpqrstv";this.s6="MNPQRSTV";this.s7=KeymanWeb.KLOAD(this.KI,"ifx","1");this.s10="1";this.KVER="16.0.138.0";this.KVS=['s7'];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16384,68)) {if(k.KFCM(1,t,[{t:'a',a:this.s5}])&&this.s7===this.s10){r=m=1;k.KDC(1,t);k.KO(-1,t,"4");k.KIO(-1,this.s6,1,t);k.KO(-1,t,"5");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_053___if_and_index.kmx b/common/test/keyboards/baseline/k_053___if_and_index.kmx deleted file mode 100644 index ee42613034..0000000000 Binary files a/common/test/keyboards/baseline/k_053___if_and_index.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_054___nul_and_contextex.kmx b/common/test/keyboards/baseline/k_054___nul_and_contextex.kmx deleted file mode 100644 index 3c75d606f4..0000000000 Binary files a/common/test/keyboards/baseline/k_054___nul_and_contextex.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.js b/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.js deleted file mode 100755 index e6913c358e..0000000000 --- a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.js +++ /dev/null @@ -1 +0,0 @@ -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_k_055___deadkey_cancelled_by_arrow());}function Keyboard_k_055___deadkey_cancelled_by_arrow(){this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;this.KI="Keyboard_k_055___deadkey_cancelled_by_arrow";this.KN="050 - deadkey cancelled by arrow";this.KMINVER="10.0";this.KV=null;this.KDU=0;this.KH='';this.KM=0;this.KBVER="1.0";this.KMBM=0x0010;this.KVER="16.0.138.0";this.KVS=[];this.gs=function(t,e) {return this.g0(t,e);};this.gs=function(t,e) {return this.g0(t,e);};this.g0=function(t,e) {var k=KeymanWeb,r=0,m=0;if(k.KKM(e,16400,54)) {if(1){r=m=1;k.KDC(0,t);k.KDO(-1,t,0);}}else if(k.KKM(e,16384,69)) {if(k.KFCM(1,t,[{t:'d',d:0}])){r=m=1;k.KDC(1,t);k.KO(-1,t,"FAIL.");}else if(1){r=m=1;k.KDC(0,t);k.KO(-1,t,"PASS.");}}return r;};} \ No newline at end of file diff --git a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmx b/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmx deleted file mode 100644 index 551a263920..0000000000 Binary files a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmx and /dev/null differ diff --git a/common/test/keyboards/baseline/k_0600___system_stores.js b/common/test/keyboards/baseline/k_0600___system_stores.js new file mode 100644 index 0000000000..b72c56cc1c --- /dev/null +++ b/common/test/keyboards/baseline/k_0600___system_stores.js @@ -0,0 +1,211 @@ +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_k_0600___system_stores()); +} +function Keyboard_k_0600___system_stores() +{ + 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_k_0600___system_stores"; + this.KN="0600 - system stores"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_digit_4="1234567890"; + this.s_letter_5="abcdefghij"; + this.s8="windows"; + this.s9="desktop"; + this.s10="hardware"; + this.s11="native"; + this.s12="en-US"; + this.s13="kbdus.dll"; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(k.KIFS(31,this.s8,t)){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"windows."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(k.KIFS(31,this.s9,t)){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"desktop."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(k.KIFS(31,this.s10,t)){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"hardware."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_4 /* 0x34 */)) { + if(k.KIFS(31,this.s11,t)){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KO(-1,t,"native."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_5 /* 0x35 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_6 /* 0x36 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_7 /* 0x37 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_8 /* 0x38 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_9 /* 0x39 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(k.KIFS(32,this.s12,t)){ + r=m=1; // Line 25 + k.KDC(0,t); + k.KO(-1,t,"en-US."); + } + else if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(k.KIFS(32,this.s13,t)){ + r=m=1; // Line 26 + k.KDC(0,t); + k.KO(-1,t,"kbdus.dll."); + } + else if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_C /* 0x43 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_D /* 0x44 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_E /* 0x45 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_F /* 0x46 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_G /* 0x47 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_H /* 0x48 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_I /* 0x49 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_J /* 0x4A */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_026___system_stores.kmn b/common/test/keyboards/baseline/k_0600___system_stores.kmn similarity index 94% rename from common/test/keyboards/baseline/k_026___system_stores.kmn rename to common/test/keyboards/baseline/k_0600___system_stores.kmn index 0538c51364..9b63ffb576 100644 --- a/common/test/keyboards/baseline/k_026___system_stores.kmn +++ b/common/test/keyboards/baseline/k_0600___system_stores.kmn @@ -1,8 +1,8 @@ -store(&NAME) '026 - system stores' +store(&NAME) '0600 - system stores' c Description: Tests platform and baselayout system store rules c keys: [K_1][K_2][K_3][K_4][K_A][K_B] c expected: windows.desktop.hardware.native.en-US.kbdus.dll. -c context: +c context: c (default) option: &platform=windows desktop hardware native <-- ignored by test c (default) option: &baseLayout=kbdus.dll <-- ignored by test c (default) option: &baseLayoutAlt=en-US <-- ignored by test diff --git a/common/test/keyboards/baseline/k_0600___system_stores.kmx b/common/test/keyboards/baseline/k_0600___system_stores.kmx new file mode 100644 index 0000000000..54c86383bc Binary files /dev/null and b/common/test/keyboards/baseline/k_0600___system_stores.kmx differ diff --git a/common/test/keyboards/baseline/k_0601___system_stores_2.js b/common/test/keyboards/baseline/k_0601___system_stores_2.js new file mode 100644 index 0000000000..2a2d14135e --- /dev/null +++ b/common/test/keyboards/baseline/k_0601___system_stores_2.js @@ -0,0 +1,211 @@ +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_k_0601___system_stores_2()); +} +function Keyboard_k_0601___system_stores_2() +{ + 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_k_0601___system_stores_2"; + this.KN="0601 - system stores 2"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_digit_4="1234567890"; + this.s_letter_5="abcdefghij"; + this.s8="linux"; + this.s9="desktop"; + this.s10="hardware"; + this.s11="native"; + this.s12="fr-FR"; + this.s13="kbdfr.dll"; + 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_0 /* 0x30 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_1 /* 0x31 */)) { + if(k.KIFS(31,this.s8,t)){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"linux."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_2 /* 0x32 */)) { + if(k.KIFS(31,this.s9,t)){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"desktop."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(k.KIFS(31,this.s10,t)){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"hardware."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_4 /* 0x34 */)) { + if(k.KIFS(31,this.s11,t)){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KO(-1,t,"native."); + } + else if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_5 /* 0x35 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_6 /* 0x36 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_7 /* 0x37 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_8 /* 0x38 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_9 /* 0x39 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"platform-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(k.KIFS(32,this.s12,t)){ + r=m=1; // Line 25 + k.KDC(0,t); + k.KO(-1,t,"fr-FR."); + } + else if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(k.KIFS(32,this.s13,t)){ + r=m=1; // Line 26 + k.KDC(0,t); + k.KO(-1,t,"kbdfr.dll."); + } + else if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_C /* 0x43 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_D /* 0x44 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_E /* 0x45 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_F /* 0x46 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_G /* 0x47 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_H /* 0x48 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_I /* 0x49 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_J /* 0x4A */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"baselayout-fail."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_027___system_stores_2.kmn b/common/test/keyboards/baseline/k_0601___system_stores_2.kmn similarity index 93% rename from common/test/keyboards/baseline/k_027___system_stores_2.kmn rename to common/test/keyboards/baseline/k_0601___system_stores_2.kmn index 95457c8463..3e30cbf5e5 100644 --- a/common/test/keyboards/baseline/k_027___system_stores_2.kmn +++ b/common/test/keyboards/baseline/k_0601___system_stores_2.kmn @@ -1,8 +1,8 @@ -store(&NAME) '027 - system stores 2' +store(&NAME) '0601 - system stores 2' c Description: Tests platform and baselayout system store rules c keys: [K_1][K_2][K_3][K_4][K_A][K_B] c expected: linux.desktop.hardware.native.fr-FR.kbdfr.dll. -c context: +c context: c option: &platform=linux desktop hardware native c option: &baseLayout=kbdfr.dll c option: &baseLayoutAlt=fr-FR diff --git a/common/test/keyboards/baseline/k_0601___system_stores_2.kmx b/common/test/keyboards/baseline/k_0601___system_stores_2.kmx new file mode 100644 index 0000000000..f19063be7d Binary files /dev/null and b/common/test/keyboards/baseline/k_0601___system_stores_2.kmx differ diff --git a/common/test/keyboards/baseline/k_0700___caps_lock.js b/common/test/keyboards/baseline/k_0700___caps_lock.js new file mode 100644 index 0000000000..a89cef36e4 --- /dev/null +++ b/common/test/keyboards/baseline/k_0700___caps_lock.js @@ -0,0 +1,103 @@ +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_k_0700___caps_lock()); +} +function Keyboard_k_0700___caps_lock() +{ + 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_k_0700___caps_lock"; + this.KN="0700 - caps lock"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.SHIFT | modCodes.CAPS | modCodes.NO_CAPS /* 0x0310 */; + 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.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 14 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 15 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4210 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4110 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_A /* 0x41 */)) { + if(1){ + r=m=1; // Line 24 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_B /* 0x42 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_A /* 0x41 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(1){ + r=m=1; // Line 26 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_031___caps_lock.kmn b/common/test/keyboards/baseline/k_0700___caps_lock.kmn similarity index 93% rename from common/test/keyboards/baseline/k_031___caps_lock.kmn rename to common/test/keyboards/baseline/k_0700___caps_lock.kmn index d14b8ad56b..27fc5b6b73 100644 --- a/common/test/keyboards/baseline/k_031___caps_lock.kmn +++ b/common/test/keyboards/baseline/k_0700___caps_lock.kmn @@ -1,4 +1,4 @@ -store(&NAME) '031 - caps lock' +store(&NAME) '0700 - caps lock' c Description: Tests Caps Lock c keys: [K_1][SHIFT K_2][SHIFT K_3][K_A][SHIFT K_B] c expected: pass.pass.pass.pass.pass. diff --git a/common/test/keyboards/baseline/k_0700___caps_lock.kmx b/common/test/keyboards/baseline/k_0700___caps_lock.kmx new file mode 100644 index 0000000000..072520eb51 Binary files /dev/null and b/common/test/keyboards/baseline/k_0700___caps_lock.kmx differ diff --git a/common/test/keyboards/baseline/k_0701___caps_control.js b/common/test/keyboards/baseline/k_0701___caps_control.js new file mode 100644 index 0000000000..0b4ee57e6d --- /dev/null +++ b/common/test/keyboards/baseline/k_0701___caps_control.js @@ -0,0 +1,131 @@ +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_k_0701___caps_control()); +} +function Keyboard_k_0701___caps_control() +{ + 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_k_0701___caps_control"; + this.KN="0701 - caps control"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.SHIFT | modCodes.CAPS | modCodes.NO_CAPS /* 0x0310 */; + 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.SHIFT | modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4210 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 24 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4110 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 25 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_4 /* 0x34 */)) { + if(1){ + r=m=1; // Line 27 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_4 /* 0x34 */)) { + if(1){ + r=m=1; // Line 28 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_5 /* 0x35 */)) { + if(1){ + r=m=1; // Line 30 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_5 /* 0x35 */)) { + if(1){ + r=m=1; // Line 31 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_6 /* 0x36 */)) { + if(1){ + r=m=1; // Line 33 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_6 /* 0x36 */)) { + if(1){ + r=m=1; // Line 34 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_7 /* 0x37 */)) { + if(1){ + r=m=1; // Line 37 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_7 /* 0x37 */)) { + if(1){ + r=m=1; // Line 38 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_032___caps_control.kmn b/common/test/keyboards/baseline/k_0701___caps_control.kmn similarity index 96% rename from common/test/keyboards/baseline/k_032___caps_control.kmn rename to common/test/keyboards/baseline/k_0701___caps_control.kmn index 884fb41a6d..13c9aa29a0 100644 --- a/common/test/keyboards/baseline/k_032___caps_control.kmn +++ b/common/test/keyboards/baseline/k_0701___caps_control.kmn @@ -1,4 +1,4 @@ -store(&NAME) '032 - caps control' +store(&NAME) '0701 - caps control' c Description: Tests Caps Lock env set c keys: [K_1][K_CAPS][K_2][SHIFT K_3][K_4][K_CAPS][K_5][K_CAPS][K_6][K_SHIFT][K_7] c expected: pass.pass.pass.pass.pass.pass.pass. diff --git a/common/test/keyboards/baseline/k_0701___caps_control.kmx b/common/test/keyboards/baseline/k_0701___caps_control.kmx new file mode 100644 index 0000000000..c9f04435d2 Binary files /dev/null and b/common/test/keyboards/baseline/k_0701___caps_control.kmx differ diff --git a/common/test/keyboards/baseline/k_0702___caps_always_off.js b/common/test/keyboards/baseline/k_0702___caps_always_off.js new file mode 100644 index 0000000000..48455fb1a9 --- /dev/null +++ b/common/test/keyboards/baseline/k_0702___caps_always_off.js @@ -0,0 +1,75 @@ +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_k_0702___caps_always_off()); +} +function Keyboard_k_0702___caps_always_off() +{ + 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_k_0702___caps_always_off"; + this.KN="0702 - caps always off"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.CAPS | modCodes.NO_CAPS /* 0x0300 */; + 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.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 16 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 19 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 22 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_033___caps_always_off.kmn b/common/test/keyboards/baseline/k_0702___caps_always_off.kmn similarity index 90% rename from common/test/keyboards/baseline/k_033___caps_always_off.kmn rename to common/test/keyboards/baseline/k_0702___caps_always_off.kmn index 912f2c5ac0..fb2099bbe9 100644 --- a/common/test/keyboards/baseline/k_033___caps_always_off.kmn +++ b/common/test/keyboards/baseline/k_0702___caps_always_off.kmn @@ -1,4 +1,4 @@ -store(&NAME) '033 - caps always off' +store(&NAME) '0702 - caps always off' c Description: Tests Caps Lock always off c keys: [K_1][K_CAPS][K_2][K_CAPS][K_3] c expected: pass.pass.pass. diff --git a/common/test/keyboards/baseline/k_0702___caps_always_off.kmx b/common/test/keyboards/baseline/k_0702___caps_always_off.kmx new file mode 100644 index 0000000000..f8d6c0c9df Binary files /dev/null and b/common/test/keyboards/baseline/k_0702___caps_always_off.kmx differ diff --git a/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.js b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.js new file mode 100644 index 0000000000..a482844bec --- /dev/null +++ b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.js @@ -0,0 +1,75 @@ +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_k_0703___caps_always_off_initially_on()); +} +function Keyboard_k_0703___caps_always_off_initially_on() +{ + 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_k_0703___caps_always_off_initially_on"; + this.KN="0703 - caps always off initially on"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.CAPS | modCodes.NO_CAPS /* 0x0300 */; + 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.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 17 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_1 /* 0x31 */)) { + if(1){ + r=m=1; // Line 18 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 20 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_2 /* 0x32 */)) { + if(1){ + r=m=1; // Line 21 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + else if(k.KKM(e, modCodes.CAPS | modCodes.VIRTUAL_KEY /* 0x4100 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 23 + k.KDC(0,t); + k.KO(-1,t,"fail."); + } + } + else if(k.KKM(e, modCodes.NO_CAPS | modCodes.VIRTUAL_KEY /* 0x4200 */, keyCodes.K_3 /* 0x33 */)) { + if(1){ + r=m=1; // Line 24 + k.KDC(0,t); + k.KO(-1,t,"pass."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmn b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmn similarity index 90% rename from common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmn rename to common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmn index 4c0b691365..140a3167e0 100644 --- a/common/test/keyboards/baseline/k_047___caps_always_off_initially_on.kmn +++ b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmn @@ -1,4 +1,4 @@ -store(&NAME) '047 - caps always off initially on' +store(&NAME) '0703 - caps always off initially on' c Description: Tests Caps Lock always off, entry to the test has Caps Lock c on to test that it is then switched off on first keystroke event. c keys: [K_1][K_CAPS][K_2][K_CAPS][K_3] diff --git a/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmx b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmx new file mode 100644 index 0000000000..bd9c41c9dc Binary files /dev/null and b/common/test/keyboards/baseline/k_0703___caps_always_off_initially_on.kmx differ diff --git a/common/test/keyboards/baseline/k_0800___long_context.js b/common/test/keyboards/baseline/k_0800___long_context.js new file mode 100644 index 0000000000..9870e97456 --- /dev/null +++ b/common/test/keyboards/baseline/k_0800___long_context.js @@ -0,0 +1,40 @@ + +KeymanWeb.KR(new Keyboard_k_0800___long_context()); + +function Keyboard_k_0800___long_context() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0800___long_context"; + this.KN="0800 - long context"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x20)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t," "); + } + } + else if(k.KKM(e, 0x4000, 0x46)) { + if(k.KCM(1,t," ",1)){ + r=m=1; // Line 16 + k.KO(1,t," "); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_040___long_context.kmn b/common/test/keyboards/baseline/k_0800___long_context.kmn similarity index 91% rename from common/test/keyboards/baseline/k_040___long_context.kmn rename to common/test/keyboards/baseline/k_0800___long_context.kmn index f570d25710..b14373ae3d 100644 --- a/common/test/keyboards/baseline/k_040___long_context.kmn +++ b/common/test/keyboards/baseline/k_0800___long_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '040 - long context' +store(&NAME) '0800 - long context' c Description: Tests context longer than 64 chars c keys: [K_SPACE][K_F] c expected: 012345678901234567890123456789012345678901234567890123456789012\u0020 diff --git a/common/test/keyboards/baseline/k_0800___long_context.kmx b/common/test/keyboards/baseline/k_0800___long_context.kmx new file mode 100644 index 0000000000..7ff3b9dc82 Binary files /dev/null and b/common/test/keyboards/baseline/k_0800___long_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.js b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.js new file mode 100644 index 0000000000..01f5f0f0d2 --- /dev/null +++ b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.js @@ -0,0 +1,75 @@ + +KeymanWeb.KR(new Keyboard_k_0801___long_context_and_deadkeys()); + +function Keyboard_k_0801___long_context_and_deadkeys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0801___long_context_and_deadkeys"; + this.KN="0801 - long context and deadkeys"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x31)) { + if(k.KDM(60,t,0)&&k.KCM(60,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh",60)){ + r=m=1; // Line 18 + k.KO(-1,t,"1"); + } + } + else if(k.KKM(e, 0x4000, 0x32)) { + if(k.KCM(63,t,"\x08\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",63)){ + r=m=1; // Line 22 + k.KO(63,t,"FAIL TEST 2"); + } + else if(k.KCM(62,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",62)){ + r=m=1; // Line 23 + k.KO(62,t,"FAIL TEST 2"); + } + else if(k.KCM(61,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1",61)){ + r=m=1; // Line 24 + k.KO(-1,t,"2"); + } + } + else if(k.KKM(e, 0x4000, 0x33)) { + if(k.KCM(64,t,"\x08\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",64)){ + r=m=1; // Line 28 + k.KO(64,t,"FAIL TEST 3"); + } + else if(k.KCM(63,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",63)){ + r=m=1; // Line 29 + k.KO(63,t,"FAIL TEST 3"); + } + else if(k.KCM(62,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12",62)){ + r=m=1; // Line 30 + k.KO(62,t,"abcdefghijklmnopqrstuvwxyz123"); + } + } + else if(k.KKM(e, 0x4000, 0x34)) { + if(k.KDM(29,t,0)&&k.KCM(29,t,"abcdefghijklmnopqrstuvwxyz123",29)){ + r=m=1; // Line 33 + k.KO(29,t,"PASS"); + } + } + else if(k.KKM(e, 0x4000, 0x5A)) { + if(1){ + r=m=1; // Line 15 + k.KDO(0,t,0); + k.KO(-1,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmn b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmn similarity index 96% rename from common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmn rename to common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmn index 455fa1c41c..29fea90590 100644 --- a/common/test/keyboards/baseline/k_041___long_context_and_deadkeys.kmn +++ b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmn @@ -1,4 +1,4 @@ -store(&NAME) '041 - long context and deadkeys' +store(&NAME) '0801 - long context and deadkeys' c Description: Tests that we don't split a dk in context:set. Note that we start with a context c with length MAXCONTEXT-1 (abc...fgh is 60 characters/bytes long + 3 bytes for dk(1)). c keys: [K_Z][K_1][K_2][K_3][K_4] diff --git a/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmx b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmx new file mode 100644 index 0000000000..ff8c7a55ba Binary files /dev/null and b/common/test/keyboards/baseline/k_0801___long_context_and_deadkeys.kmx differ diff --git a/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.js b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.js new file mode 100644 index 0000000000..467eb87472 --- /dev/null +++ b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.js @@ -0,0 +1,57 @@ + +KeymanWeb.KR(new Keyboard_k_0802___long_context_and_split_deadkeys()); + +function Keyboard_k_0802___long_context_and_split_deadkeys() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0802___long_context_and_split_deadkeys"; + this.KN="0802 - long context and split deadkeys"; + this.KMINVER="6.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x20)) { + if(k.KCM(64,t,"\x01abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk",64)){ + r=m=1; // Line 18 + k.KO(64,t,"FAIL"); + } + else if(k.KDM(63,t,0)&&k.KCM(63,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk",63)){ + r=m=1; // Line 19 + k.KO(63,t,"UNEXPECTED"); + } + } + else if(k.KKM(e, 0x4000, 0x31)) { + if(k.KCM(61,t,"defghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk ",61)){ + r=m=1; // Line 22 + k.KO(61,t,"def"); + } + } + else if(k.KKM(e, 0x4000, 0x32)) { + if(k.KDM(6,t,0)&&k.KCM(6,t,"abcdef",6)){ + r=m=1; // Line 23 + k.KO(6,t,"PASS"); + } + } + else if(k.KKM(e, 0x4000, 0x5A)) { + if(1){ + r=m=1; // Line 14 + k.KDO(0,t,0); + k.KO(-1,t,"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmn b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmn similarity index 93% rename from common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmn rename to common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmn index ce31d18e28..a6d883886a 100644 --- a/common/test/keyboards/baseline/k_042___long_context_and_split_deadkeys.kmn +++ b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmn @@ -1,4 +1,4 @@ -store(&NAME) '042 - long context and split deadkeys' +store(&NAME) '0802 - long context and split deadkeys' c Description: Tests that we don't split a dk in context. Note that we start with a context with length MAXCONTEXT. c keys: [K_Z][K_SPACE][K_1][K_2] c context: diff --git a/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmx b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmx new file mode 100644 index 0000000000..f26e1e4386 Binary files /dev/null and b/common/test/keyboards/baseline/k_0802___long_context_and_split_deadkeys.kmx differ diff --git a/common/test/keyboards/baseline/k_0803___if_and_context.js b/common/test/keyboards/baseline/k_0803___if_and_context.js new file mode 100644 index 0000000000..68ac3f6dcf --- /dev/null +++ b/common/test/keyboards/baseline/k_0803___if_and_context.js @@ -0,0 +1,51 @@ +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_k_0803___if_and_context()); +} +function Keyboard_k_0803___if_and_context() +{ + 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_k_0803___if_and_context"; + this.KN="0803 - if and context"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_nfc_5=KeymanWeb.KLOAD(this.KI,"nfc","0"); + this.s_diaeresisBase_6="ae"; + this.s8="0"; + this.KVS=['s_nfc_5']; + 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 16 + k.KDC(0,t); + k.KO(-1,t,"exay"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_B /* 0x42 */)) { + if(k.KFCM(4,t,[{t:'a',a:this.s_diaeresisBase_6},'x',{t:'a',a:this.s_diaeresisBase_6},'y'])&&this.s_nfc_5===this.s8){ + r=m=1; // Line 20 + k.KDC(4,t); + k.KIO(-1,this.s_diaeresisBase_6,1,t); + k.KO(-1,t,"x"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_044___if_and_context.kmn b/common/test/keyboards/baseline/k_0803___if_and_context.kmn similarity index 91% rename from common/test/keyboards/baseline/k_044___if_and_context.kmn rename to common/test/keyboards/baseline/k_0803___if_and_context.kmn index 352490325c..e19a96c17a 100644 --- a/common/test/keyboards/baseline/k_044___if_and_context.kmn +++ b/common/test/keyboards/baseline/k_0803___if_and_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '044 - if and context' +store(&NAME) '0803 - if and context' c Description: Tests that context(x) takes if() statements into account. See #4275. c keys: [K_A][K_B] c expected: ex diff --git a/common/test/keyboards/baseline/k_0803___if_and_context.kmx b/common/test/keyboards/baseline/k_0803___if_and_context.kmx new file mode 100644 index 0000000000..17e648142b Binary files /dev/null and b/common/test/keyboards/baseline/k_0803___if_and_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0804___deadkey_and_context.js b/common/test/keyboards/baseline/k_0804___deadkey_and_context.js new file mode 100644 index 0000000000..0b233bdc24 --- /dev/null +++ b/common/test/keyboards/baseline/k_0804___deadkey_and_context.js @@ -0,0 +1,64 @@ +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_k_0804___deadkey_and_context()); +} +function Keyboard_k_0804___deadkey_and_context() +{ + 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_k_0804___deadkey_and_context"; + this.KN="0804 - deadkey and context"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.SHIFT /* 0x0010 */; + 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.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_SLASH /* 0xBF */)) { + if(k.KFCM(7,t,['<',{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2},'>'])){ + r=m=1; // Line 18 + k.KDC(7,t); + k.KO(-1,t,"correct"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_Y /* 0x59 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KDO(-1,t,0); + k.KO(-1,t,"a"); + k.KDO(-1,t,1); + k.KO(-1,t,"b"); + k.KDO(-1,t,2); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_Z /* 0x5A */)) { + if(k.KFCM(5,t,[{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2}])){ + r=m=1; // Line 17 + k.KDC(5,t); + k.KO(-1,t,"<"); + k.KDO(-1,t,0); + k.KO(-1,t,"a"); + k.KDO(-1,t,1); + k.KO(-1,t,"b"); + k.KDO(-1,t,2); + k.KO(-1,t,">"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_045___deadkey_and_context.kmn b/common/test/keyboards/baseline/k_0804___deadkey_and_context.kmn similarity index 90% rename from common/test/keyboards/baseline/k_045___deadkey_and_context.kmn rename to common/test/keyboards/baseline/k_0804___deadkey_and_context.kmn index c79953a05b..3c6522d470 100644 --- a/common/test/keyboards/baseline/k_045___deadkey_and_context.kmn +++ b/common/test/keyboards/baseline/k_0804___deadkey_and_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '045 - deadkey and context' +store(&NAME) '0804 - deadkey and context' c Description: Tests that context emits deadkeys correctly. See #4275. c keys: [K_Y][K_Z][SHIFT K_SLASH] c expected: correct diff --git a/common/test/keyboards/baseline/k_0804___deadkey_and_context.kmx b/common/test/keyboards/baseline/k_0804___deadkey_and_context.kmx new file mode 100644 index 0000000000..c0a8199fa5 Binary files /dev/null and b/common/test/keyboards/baseline/k_0804___deadkey_and_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.js b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.js new file mode 100644 index 0000000000..b58f22a223 --- /dev/null +++ b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.js @@ -0,0 +1,60 @@ +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_k_0805___deadkey_and_contextex()); +} +function Keyboard_k_0805___deadkey_and_contextex() +{ + 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_k_0805___deadkey_and_contextex"; + this.KN="0805 - deadkey and contextex"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.SHIFT /* 0x0010 */; + 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.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_SLASH /* 0xBF */)) { + if(k.KFCM(3,t,['<',{t:'d',d:0},'>'])){ + r=m=1; // Line 18 + k.KDC(3,t); + k.KO(-1,t,"correct"); + } + } + else if(k.KKM(e, modCodes.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_M /* 0x4D */)) { + if(k.KFCM(5,t,[{t:'d',d:0},'a',{t:'d',d:1},'b',{t:'d',d:2}])){ + r=m=1; // Line 17 + k.KDC(5,t); + k.KO(-1,t,"<"); + k.KDO(-1,t,0); + k.KO(-1,t,">"); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_Y /* 0x59 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KDO(-1,t,0); + k.KO(-1,t,"a"); + k.KDO(-1,t,1); + k.KO(-1,t,"b"); + k.KDO(-1,t,2); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmn b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmn similarity index 89% rename from common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmn rename to common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmn index 48ad796c3e..f120a98252 100644 --- a/common/test/keyboards/baseline/k_046___deadkey_and_contextex.kmn +++ b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmn @@ -1,4 +1,4 @@ -store(&NAME) '046 - deadkey and contextex' +store(&NAME) '0805 - deadkey and contextex' c Description: Tests that context() emits deadkeys correctly. See #4275. c keys: [K_Y][SHIFT K_M][SHIFT K_SLASH] c expected: correct diff --git a/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmx b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmx new file mode 100644 index 0000000000..73811a388a Binary files /dev/null and b/common/test/keyboards/baseline/k_0805___deadkey_and_contextex.kmx differ diff --git a/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.js b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.js new file mode 100644 index 0000000000..afb8164dee --- /dev/null +++ b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.js @@ -0,0 +1,40 @@ + +KeymanWeb.KR(new Keyboard_k_0806___modifier_keys_keep_context()); + +function Keyboard_k_0806___modifier_keys_keep_context() +{ + + this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9; + this.KI="Keyboard_k_0806___modifier_keys_keep_context"; + this.KN="0806 - modifier keys keep context"; + this.KMINVER="9.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0x0000; + 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, 0x4000, 0x41)) { + if(1){ + r=m=1; // Line 13 + k.KO(0,t,"a"); + } + } + else if(k.KKM(e, 0x4000, 0x42)) { + if(k.KCM(1,t,"a",1)){ + r=m=1; // Line 15 + k.KO(1,t,"pass."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmn b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmn similarity index 85% rename from common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmn rename to common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmn index bb0cfc4df5..97cce24a6b 100644 --- a/common/test/keyboards/baseline/k_048___modifier_keys_keep_context.kmn +++ b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '048 - modifier keys keep context' +store(&NAME) '0806 - modifier keys keep context' c Description: Tests that modifier keys don't reset context (#5591) c keys: [K_A][K_SHIFT][K_B][K_A][K_ALT][K_B][K_A][K_CAPS][K_B] c expected: pass.pass.pass. diff --git a/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmx b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmx new file mode 100644 index 0000000000..fcf3ca65c5 Binary files /dev/null and b/common/test/keyboards/baseline/k_0806___modifier_keys_keep_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0807___enter_invalidates_context.js b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.js new file mode 100644 index 0000000000..90948d0648 --- /dev/null +++ b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.js @@ -0,0 +1,40 @@ +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_k_0807___enter_invalidates_context()); +} +function Keyboard_k_0807___enter_invalidates_context() +{ + 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_k_0807___enter_invalidates_context"; + this.KN="0807 - enter_invalidates_context"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + 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_C /* 0x43 */)) { + if(k.KFCM(2,t,['a','b'])){ + r=m=1; // Line 17 + k.KDC(2,t); + k.KO(-1,t,"abd"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_049___enter_invalidates_context.kmn b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmn similarity index 89% rename from common/test/keyboards/baseline/k_049___enter_invalidates_context.kmn rename to common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmn index 78363865ef..c66f2fccf0 100644 --- a/common/test/keyboards/baseline/k_049___enter_invalidates_context.kmn +++ b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '049 - enter_invalidates_context' +store(&NAME) '0807 - enter_invalidates_context' c Description: Tests that core context is cleared when kb processor c determines its invalid. eg Enter key See #10182. c keys: [K_A][K_B][K_ENTER][K_C] diff --git a/common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmx b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmx new file mode 100644 index 0000000000..863379d98c Binary files /dev/null and b/common/test/keyboards/baseline/k_0807___enter_invalidates_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0808___nul_and_context.js b/common/test/keyboards/baseline/k_0808___nul_and_context.js new file mode 100644 index 0000000000..cca0be5e35 --- /dev/null +++ b/common/test/keyboards/baseline/k_0808___nul_and_context.js @@ -0,0 +1,43 @@ +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_k_0808___nul_and_context()); +} +function Keyboard_k_0808___nul_and_context() +{ + 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_k_0808___nul_and_context"; + this.KN="0808 - nul_and_context"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_cons_4="mnpqrstv"; + 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_B /* 0x42 */)) { + if(k.KFCM(2,t,[{t:'n'},{t:'a',a:this.s_cons_4}])){ + r=m=1; // Line 15 + k.KDC(1,t); + k.KO(-1,t,"2"); + k.KIO(-1,this.s_cons_4,1,t); + k.KO(-1,t,"3"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_050___nul_and_context.kmn b/common/test/keyboards/baseline/k_0808___nul_and_context.kmn similarity index 87% rename from common/test/keyboards/baseline/k_050___nul_and_context.kmn rename to common/test/keyboards/baseline/k_0808___nul_and_context.kmn index 206777b7f0..fabac4155c 100644 --- a/common/test/keyboards/baseline/k_050___nul_and_context.kmn +++ b/common/test/keyboards/baseline/k_0808___nul_and_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '050 - nul_and_context' +store(&NAME) '0808 - nul_and_context' c Description: Tests that context has the right offset when used with nul c keys: [K_T][K_B] c expected: 2t3 diff --git a/common/test/keyboards/baseline/k_0808___nul_and_context.kmx b/common/test/keyboards/baseline/k_0808___nul_and_context.kmx new file mode 100644 index 0000000000..2304b23fe7 Binary files /dev/null and b/common/test/keyboards/baseline/k_0808___nul_and_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0809___if_and_context.js b/common/test/keyboards/baseline/k_0809___if_and_context.js new file mode 100644 index 0000000000..a2e3ecd035 --- /dev/null +++ b/common/test/keyboards/baseline/k_0809___if_and_context.js @@ -0,0 +1,45 @@ +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_k_0809___if_and_context()); +} +function Keyboard_k_0809___if_and_context() +{ + 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_k_0809___if_and_context"; + this.KN="0809 - if_and_context"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_cons_4="mnpqrstv"; + this.s_ifx_5=KeymanWeb.KLOAD(this.KI,"ifx","1"); + this.s8="1"; + this.KVS=['s_ifx_5']; + 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_D /* 0x44 */)) { + if(k.KFCM(1,t,[{t:'a',a:this.s_cons_4}])&&this.s_ifx_5===this.s8){ + r=m=1; // Line 16 + k.KDC(1,t); + k.KO(-1,t,"4"); + k.KIO(-1,this.s_cons_4,1,t); + k.KO(-1,t,"5"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_051___if_and_context.kmn b/common/test/keyboards/baseline/k_0809___if_and_context.kmn similarity index 88% rename from common/test/keyboards/baseline/k_051___if_and_context.kmn rename to common/test/keyboards/baseline/k_0809___if_and_context.kmn index 7a6a3e3f63..29c7c48ddb 100644 --- a/common/test/keyboards/baseline/k_051___if_and_context.kmn +++ b/common/test/keyboards/baseline/k_0809___if_and_context.kmn @@ -1,4 +1,4 @@ -store(&NAME) '051 - if_and_context' +store(&NAME) '0809 - if_and_context' c Description: Tests that context has the right offset when used with if c keys: [K_T][K_D] c expected: 4t5 diff --git a/common/test/keyboards/baseline/k_0809___if_and_context.kmx b/common/test/keyboards/baseline/k_0809___if_and_context.kmx new file mode 100644 index 0000000000..ac1e467c9c Binary files /dev/null and b/common/test/keyboards/baseline/k_0809___if_and_context.kmx differ diff --git a/common/test/keyboards/baseline/k_0810___nul_and_index.js b/common/test/keyboards/baseline/k_0810___nul_and_index.js new file mode 100644 index 0000000000..1f86fe5ac0 --- /dev/null +++ b/common/test/keyboards/baseline/k_0810___nul_and_index.js @@ -0,0 +1,44 @@ +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_k_0810___nul_and_index()); +} +function Keyboard_k_0810___nul_and_index() +{ + 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_k_0810___nul_and_index"; + this.KN="0810 - nul_and_index"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_cons_4="mnpqrstv"; + this.s_outs_5="MNPQRSTV"; + 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_B /* 0x42 */)) { + if(k.KFCM(2,t,[{t:'n'},{t:'a',a:this.s_cons_4}])){ + r=m=1; // Line 16 + k.KDC(1,t); + k.KO(-1,t,"2"); + k.KIO(-1,this.s_outs_5,1,t); + k.KO(-1,t,"3"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_052___nul_and_index.kmn b/common/test/keyboards/baseline/k_0810___nul_and_index.kmn similarity index 88% rename from common/test/keyboards/baseline/k_052___nul_and_index.kmn rename to common/test/keyboards/baseline/k_0810___nul_and_index.kmn index c56c411c07..91940d089c 100644 --- a/common/test/keyboards/baseline/k_052___nul_and_index.kmn +++ b/common/test/keyboards/baseline/k_0810___nul_and_index.kmn @@ -1,4 +1,4 @@ -store(&NAME) '052 - nul_and_index' +store(&NAME) '0810 - nul_and_index' c Description: Tests that context has the right offset when used with nul c keys: [K_T][K_B] c expected: 2T3 diff --git a/common/test/keyboards/baseline/k_0810___nul_and_index.kmx b/common/test/keyboards/baseline/k_0810___nul_and_index.kmx new file mode 100644 index 0000000000..ea1a20064e Binary files /dev/null and b/common/test/keyboards/baseline/k_0810___nul_and_index.kmx differ diff --git a/common/test/keyboards/baseline/k_0811___if_and_index.js b/common/test/keyboards/baseline/k_0811___if_and_index.js new file mode 100644 index 0000000000..68205a31e7 --- /dev/null +++ b/common/test/keyboards/baseline/k_0811___if_and_index.js @@ -0,0 +1,46 @@ +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_k_0811___if_and_index()); +} +function Keyboard_k_0811___if_and_index() +{ + 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_k_0811___if_and_index"; + this.KN="0811 - if_and_index"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=0 /* 0x0000 */; + this.s_cons_4="mnpqrstv"; + this.s_outs_5="MNPQRSTV"; + this.s_ifx_6=KeymanWeb.KLOAD(this.KI,"ifx","1"); + this.s9="1"; + this.KVS=['s_ifx_6']; + 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_D /* 0x44 */)) { + if(k.KFCM(1,t,[{t:'a',a:this.s_cons_4}])&&this.s_ifx_6===this.s9){ + r=m=1; // Line 17 + k.KDC(1,t); + k.KO(-1,t,"4"); + k.KIO(-1,this.s_outs_5,1,t); + k.KO(-1,t,"5"); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_053___if_and_index.kmn b/common/test/keyboards/baseline/k_0811___if_and_index.kmn similarity index 89% rename from common/test/keyboards/baseline/k_053___if_and_index.kmn rename to common/test/keyboards/baseline/k_0811___if_and_index.kmn index 86479a8e88..b019ffcc2b 100644 --- a/common/test/keyboards/baseline/k_053___if_and_index.kmn +++ b/common/test/keyboards/baseline/k_0811___if_and_index.kmn @@ -1,4 +1,4 @@ -store(&NAME) '053 - if_and_index' +store(&NAME) '0811 - if_and_index' c Description: Tests that index() has the right offset when used with if c keys: [K_T][K_D] c expected: 4T5 diff --git a/common/test/keyboards/baseline/k_0811___if_and_index.kmx b/common/test/keyboards/baseline/k_0811___if_and_index.kmx new file mode 100644 index 0000000000..3313e890f9 Binary files /dev/null and b/common/test/keyboards/baseline/k_0811___if_and_index.kmx differ diff --git a/common/test/keyboards/baseline/k_054___nul_and_contextex.kmn b/common/test/keyboards/baseline/k_0812___nul_and_contextex.kmn similarity index 88% rename from common/test/keyboards/baseline/k_054___nul_and_contextex.kmn rename to common/test/keyboards/baseline/k_0812___nul_and_contextex.kmn index 39ef0d4534..ae57598e1c 100644 --- a/common/test/keyboards/baseline/k_054___nul_and_contextex.kmn +++ b/common/test/keyboards/baseline/k_0812___nul_and_contextex.kmn @@ -1,4 +1,4 @@ -store(&NAME) '054 - nul_and_contextex' +store(&NAME) '0812 - nul_and_contextex' c Description: Tests that context in context part of rule has the right offset when used with nul c keys: [K_T][K_T][K_B] c expected: 2tt3 diff --git a/common/test/keyboards/baseline/k_0812___nul_and_contextex.kmx b/common/test/keyboards/baseline/k_0812___nul_and_contextex.kmx new file mode 100644 index 0000000000..ae1dd8d8f8 Binary files /dev/null and b/common/test/keyboards/baseline/k_0812___nul_and_contextex.kmx differ diff --git a/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.js b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.js new file mode 100644 index 0000000000..3991bda76c --- /dev/null +++ b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.js @@ -0,0 +1,52 @@ +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_k_0813___deadkey_cancelled_by_arrow()); +} +function Keyboard_k_0813___deadkey_cancelled_by_arrow() +{ + 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_k_0813___deadkey_cancelled_by_arrow"; + this.KN="0813 - deadkey cancelled by arrow"; + this.KMINVER="10.0"; + this.KV=null; + this.KDU=0; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KMBM=modCodes.SHIFT /* 0x0010 */; + 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.SHIFT | modCodes.VIRTUAL_KEY /* 0x4010 */, keyCodes.K_6 /* 0x36 */)) { + if(1){ + r=m=1; // Line 13 + k.KDC(0,t); + k.KDO(-1,t,0); + } + } + else if(k.KKM(e, modCodes.VIRTUAL_KEY /* 0x4000 */, keyCodes.K_E /* 0x45 */)) { + if(k.KFCM(1,t,[{t:'d',d:0}])){ + r=m=1; // Line 14 + k.KDC(1,t); + k.KO(-1,t,"FAIL."); + } + else if(1){ + r=m=1; // Line 15 + k.KDC(0,t); + k.KO(-1,t,"PASS."); + } + } + return r; + }; +} diff --git a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmn b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmn similarity index 88% rename from common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmn rename to common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmn index b84e9a4ab7..f52c747f36 100644 --- a/common/test/keyboards/baseline/k_055___deadkey_cancelled_by_arrow.kmn +++ b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmn @@ -1,4 +1,4 @@ -store(&NAME) '050 - deadkey cancelled by arrow' +store(&NAME) '0813 - deadkey cancelled by arrow' c Description: Tests that context gets reset if we encounter a right-arrow c after a deadkey (#12968) c keys: [SHIFT K_6][K_RIGHT][K_E][SHIFT K_6][K_LEFT][K_E][SHIFT K_6][K_UP][K_E][SHIFT K_6][K_DOWN][K_E] diff --git a/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmx b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmx new file mode 100644 index 0000000000..526c9300b5 Binary files /dev/null and b/common/test/keyboards/baseline/k_0813___deadkey_cancelled_by_arrow.kmx differ diff --git a/common/test/resources/keyboards/options_with_save.js b/common/test/resources/keyboards/options_with_save.js index 8252b51660..aa8507e073 100644 --- a/common/test/resources/keyboards/options_with_save.js +++ b/common/test/resources/keyboards/options_with_save.js @@ -1,4 +1,4 @@ -// Original source may be found within the repo at /common/tests/keyboards/baseline/k_023___options_with_save.kmn +// Original source may be found within the repo at /common/tests/keyboards/baseline/k_0502___options_with_save.kmn if(typeof keyman === 'undefined') { console.log('Keyboard requires KeymanWeb 10.0 or later'); @@ -61,4 +61,4 @@ function Keyboard_options_with_save() { } return r; }; -} \ No newline at end of file +} diff --git a/common/test/resources/keyboards/test_8568_deadkeys.kmn b/common/test/resources/keyboards/test_8568_deadkeys.kmn index 4cf7cc799d..f7f3067daa 100644 --- a/common/test/resources/keyboards/test_8568_deadkeys.kmn +++ b/common/test/resources/keyboards/test_8568_deadkeys.kmn @@ -1,6 +1,6 @@ store(&NAME) 'Testcases for deadkeys bug (#8568)' c Description: Tests deadkey backspacing -c See also common/test/keyboards/baseline/k_020___deadkeys_and_backspace.kmn +c See also common/test/keyboards/baseline/k_0302___deadkeys_and_backspace.kmn c 1. One deadkey in context dk(1) + BKSP = nul c 2. One char and one deadkey in context 'a' dk(2) + BKSP = nul c 3. One deadkey and one char in context dk(3) 'a' + BKSP = nul diff --git a/core/tests/unit/km_core_keyboard_api.tests.cpp b/core/tests/unit/km_core_keyboard_api.tests.cpp index 06e604c023..aa49a93c0d 100644 --- a/core/tests/unit/km_core_keyboard_api.tests.cpp +++ b/core/tests/unit/km_core_keyboard_api.tests.cpp @@ -23,7 +23,7 @@ protected: TEST_F(KmCoreKeyboardApiTests, LoadFromBlob) { // Setup - km::core::path kmxfile = km::core::path(test_dir / "kmx/k_020___deadkeys_and_backspace.kmx"); + km::core::path kmxfile = km::core::path(test_dir / "kmx/k_0302___deadkeys_and_backspace.kmx"); std::vector data = km::tests::load_kmx_file(kmxfile.native()); ASSERT_GT(data.size(), (size_t)0); diff --git a/core/tests/unit/kmnkbd/action_set_api.tests.cpp b/core/tests/unit/kmnkbd/action_set_api.tests.cpp index 72a2d9be53..96d30d3514 100644 --- a/core/tests/unit/kmnkbd/action_set_api.tests.cpp +++ b/core/tests/unit/kmnkbd/action_set_api.tests.cpp @@ -68,7 +68,7 @@ void setup(const char *keyboard, const km_core_cu* context) { } void run_test(km_core_action_item const * action_items, const km_core_actions &actions) { - setup("k_000___null_keyboard.kmx", u""); + setup("k_0000___null_keyboard.kmx", u""); test_state->set_actions(actions); auto set_actions = test_state->actions(); diff --git a/core/tests/unit/kmnkbd/debug_api.tests.cpp b/core/tests/unit/kmnkbd/debug_api.tests.cpp index d40664436b..6cd04200f6 100644 --- a/core/tests/unit/kmnkbd/debug_api.tests.cpp +++ b/core/tests/unit/kmnkbd/debug_api.tests.cpp @@ -76,7 +76,7 @@ void setup(const char *keyboard) { * Test 1: Start with debugging disabled */ void test_debugging_disabled() { - setup("k_000___null_keyboard.kmx"); + setup("k_0000___null_keyboard.kmx"); try_status(km_core_state_debug_set(test_state, 0)); try_status(km_core_process_event(test_state, KM_CORE_VKEY_S, KM_CORE_MODIFIER_SHIFT, 1, KM_CORE_EVENT_FLAG_DEFAULT)); test_assert(debug_items(test_state, { @@ -93,7 +93,7 @@ void test_debugging_disabled() { * Test 2: Debugging enabled, no rule match */ void test_debugging_no_rule_match() { - setup("k_000___null_keyboard.kmx"); + setup("k_0000___null_keyboard.kmx"); DEBUG_GROUP gp = {u"Main"}; try_status(km_core_state_debug_set(test_state, 1)); try_status(km_core_process_event(test_state, KM_CORE_VKEY_S, KM_CORE_MODIFIER_SHIFT, 1, KM_CORE_EVENT_FLAG_DEFAULT)); @@ -114,7 +114,7 @@ void test_debugging_no_rule_match() { * Test 3: Debugging enabled, function key pressed, no rule match */ void test_debugging_function_key() { - setup("k_000___null_keyboard.kmx"); + setup("k_0000___null_keyboard.kmx"); DEBUG_GROUP gp = {u"Main"}; try_status(km_core_state_debug_set(test_state, 1)); try_status(km_core_process_event(test_state, KM_CORE_VKEY_F1, 0, 1, KM_CORE_EVENT_FLAG_DEFAULT)); @@ -136,7 +136,7 @@ void test_debugging_function_key() { * Test 4: basic rule match */ void test_basic_rule_matches() { - setup("k_002___basic_input_unicode.kmx"); + setup("k_0101___basic_input_unicode.kmx"); DEBUG_GROUP gp = {u"Main"}; DEBUG_KEY kp = { 'F', /*line*/17, /*shift*/0 }; // vkey is a char try_status(km_core_state_debug_set(test_state, 1)); @@ -202,7 +202,7 @@ void test_basic_rule_matches() { * Test 5: Multiple groups */ void test_multiple_groups() { - setup("k_030___multiple_groups.kmx"); + setup("k_0401___multiple_groups.kmx"); DEBUG_GROUP gp = {u"Main"}, gpa = {u"a"}, gpb = {u"b"}; DEBUG_KEY kp1 = { KM_CORE_VKEY_1, /*line*/13, /*shift*/KM_CORE_MODIFIER_VIRTUALKEY }, kp2 = { KM_CORE_VKEY_2, /*line*/14, /*shift*/KM_CORE_MODIFIER_VIRTUALKEY }, @@ -283,7 +283,7 @@ void test_multiple_groups() { * Test 6: store offsets */ void test_store_offsets() { - setup("k_044___if_and_context.kmx"); + setup("k_0803___if_and_context.kmx"); DEBUG_GROUP gp = {u"Main"}; DEBUG_KEY kpa = { 'a', /*line*/16, }, kpb = { 'b', /*line*/20, }; @@ -357,7 +357,7 @@ void test_store_offsets() { * Test 7: set option */ void test_set_option() { - setup("k_021___options.kmx"); + setup("k_0500___options.kmx"); DEBUG_GROUP gp = {u"Main"}; DEBUG_KEY kp1 = { '1', /*line*/17, }; DEBUG_STORE sp = {0, u"foo", u"1"}; @@ -384,7 +384,7 @@ void test_set_option() { * Test 8: save option */ void test_save_option() { - setup("k_023___options_with_save.kmx"); + setup("k_0502___options_with_save.kmx"); DEBUG_GROUP gp = {u"Main"}; DEBUG_KEY kp1 = { '2', /*line*/21, }; // DEBUG_STORE sp = {0, u"foo", u"0"}; @@ -420,7 +420,7 @@ void test_save_option() { * an 'unknown' backspace because we are at start-of-context */ void test_backspace_markers() { - setup("k_000___null_keyboard.kmx"); + setup("k_0000___null_keyboard.kmx"); km_core_context_item marker_context[] = { {KM_CORE_CT_MARKER, {0,}, {1}}, {KM_CORE_CT_MARKER, {0,}, {1}}, diff --git a/core/tests/unit/kmnkbd/state_context_api.tests.cpp b/core/tests/unit/kmnkbd/state_context_api.tests.cpp index 34de27cd94..d66dc6663d 100644 --- a/core/tests/unit/kmnkbd/state_context_api.tests.cpp +++ b/core/tests/unit/kmnkbd/state_context_api.tests.cpp @@ -133,7 +133,7 @@ void test_context_set_if_needed__identical_context() { km_core_cu const *cached_context = u"This is a test"; km_core_cu const *new_app_context = u"This is a test"; - setup("k_000___null_keyboard.kmx", cached_context, false); + setup("k_0000___null_keyboard.kmx", cached_context, false); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UNCHANGED); test_assert(is_identical_context(cached_context)); teardown(); @@ -143,7 +143,7 @@ void test_context_set_if_needed__different_context() { km_core_cu const *cached_context = u"This isn't a test"; km_core_cu const *new_app_context = u"This is a test"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(!is_identical_context(cached_context)); test_assert(is_identical_context(new_app_context)); @@ -154,7 +154,7 @@ void test_context_set_if_needed__cached_context_cleared() { km_core_cu const *cached_context = u""; km_core_cu const *new_app_context = u"This is a test"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_state_context_clear(test_state); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(!is_identical_context(cached_context)); @@ -166,7 +166,7 @@ void test_context_set_if_needed__application_context_empty() { km_core_cu const *cached_context = u"This is a test"; km_core_cu const *new_app_context = u""; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(!is_identical_context(cached_context)); test_assert(is_identical_context(new_app_context)); @@ -177,7 +177,7 @@ void test_context_set_if_needed__app_context_is_longer() { km_core_cu const *cached_context = u"This is a test"; km_core_cu const *new_app_context = u"Longer This is a test"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(!is_identical_context(cached_context)); test_assert(is_identical_context(new_app_context)); @@ -188,7 +188,7 @@ void test_context_set_if_needed__app_context_is_shorter() { km_core_cu const *cached_context = u"This is a test"; km_core_cu const *new_app_context = u"is a test"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(!is_identical_context(cached_context)); test_assert(is_identical_context(new_app_context)); @@ -199,7 +199,7 @@ void test_context_set_if_needed__identical_context_and_markers() { km_core_cu const *cached_context = u"123"; km_core_cu const *new_app_context = u"123"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_MARKER, {0}, {5}}, {KM_CORE_CT_CHAR, {0}, {'1'}}, {KM_CORE_CT_MARKER, {0}, {1}}, @@ -220,7 +220,7 @@ void test_context_set_if_needed__cached_context_shorter_and_markers() { km_core_cu const *cached_context = u"123"; km_core_cu const *new_app_context = u"0123"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_MARKER, {0}, {5}}, {KM_CORE_CT_CHAR, {0}, {'1'}}, {KM_CORE_CT_MARKER, {0}, {1}}, @@ -279,7 +279,7 @@ void test_context_set_if_needed__cached_context_longer_and_markers() { km_core_cu const *cached_context = u"0123"; km_core_cu const *new_app_context = u"123"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_CHAR, {0}, {'0'}}, @@ -337,7 +337,7 @@ void test_context_set_if_needed__surrogate_pairs_unchanged() { km_core_cu const *cached_context = u"a\U00010100"; km_core_cu const *new_app_context = u"a\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UNCHANGED); test_assert(is_identical_context(new_app_context)); teardown(); @@ -347,7 +347,7 @@ void test_context_set_if_needed__surrogate_pairs_app_context_longer() { km_core_cu const *cached_context = u"a\U00010100"; km_core_cu const *new_app_context = u"xa\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(is_identical_context(new_app_context)); teardown(); @@ -357,7 +357,7 @@ void test_context_set_if_needed__surrogate_pairs_cached_context_longer() { km_core_cu const *cached_context = u"xa\U00010100"; km_core_cu const *new_app_context = u"a\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); assert_equal_status(km_core_state_context_set_if_needed(test_state, new_app_context), KM_CORE_CONTEXT_STATUS_UPDATED); test_assert(is_identical_context(new_app_context)); teardown(); @@ -367,7 +367,7 @@ void test_context_set_if_needed__surrogate_pairs_unchanged_and_markers() { km_core_cu const *cached_context = u"a\U00010100"; km_core_cu const *new_app_context = u"a\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_CHAR, {0}, {'a'}}, @@ -387,7 +387,7 @@ void test_context_set_if_needed__surrogate_pairs_app_context_longer_and_markers() { km_core_cu const *cached_context = u"a\U00010100"; km_core_cu const *new_app_context = u"\U00010200a\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_CHAR, {0}, {'a'}}, @@ -414,7 +414,7 @@ void test_context_set_if_needed__surrogate_pairs_cached_context_longer_and_markers() { km_core_cu const *cached_context = u"\U00010200a\U00010100"; km_core_cu const *new_app_context = u"a\U00010100"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { {KM_CORE_CT_CHAR, {0}, {0x10200}}, @@ -474,7 +474,7 @@ test_context_set_if_needed() { void test_context_clear() { km_core_cu const *cached_context = u"This is a test"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); try_status(km_core_state_context_clear(test_state)); test_assert(!is_identical_context(cached_context)); test_assert(is_identical_context(u"")); @@ -485,7 +485,7 @@ test_context_clear() { void test_context_debug_empty() { km_core_cu const *cached_context = u""; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); auto str = km_core_state_context_debug(test_state, KM_CORE_DEBUG_CONTEXT_CACHED); // std::cout << str << std::endl; test_assert(std::u16string(str) == u"|| (len: 0) [ ]"); @@ -494,7 +494,7 @@ void test_context_debug_empty() { void test_context_debug_various() { km_core_cu const *cached_context = u"123\U0001F923"; - setup("k_000___null_keyboard.kmx", cached_context); + setup("k_0000___null_keyboard.kmx", cached_context); km_core_context_item const citems[] = { { KM_CORE_CT_MARKER, {0}, { 5 } }, diff --git a/core/tests/unit/kmx/README.md b/core/tests/unit/kmx/README.md index 909d891f7d..434fb7b197 100644 --- a/core/tests/unit/kmx/README.md +++ b/core/tests/unit/kmx/README.md @@ -65,12 +65,12 @@ Alternatively it's possible to run a single test with: ```bash cd core -build/arch/debug/tests/unit/kmx/kmx '../common/test/keyboards/baseline/k_038___punctkeys.kmn' '../common/test/keyboards/baseline/k_038___punctkeys.kmx' +build/arch/debug/tests/unit/kmx/kmx '../common/test/keyboards/baseline/k_0107___punctkeys.kmn' '../common/test/keyboards/baseline/k_0107___punctkeys.kmx' ``` or shorter: ```bash cd core -build/arch/debug/tests/unit/kmx/kmx '../common/test/keyboards/baseline/k_038___punctkeys'.km{n,x} +build/arch/debug/tests/unit/kmx/kmx '../common/test/keyboards/baseline/k_0107___punctkeys'.km{n,x} ``` diff --git a/core/tests/unit/kmx/meson.build b/core/tests/unit/kmx/meson.build index 71e2aed1b5..a3af0a741e 100644 --- a/core/tests/unit/kmx/meson.build +++ b/core/tests/unit/kmx/meson.build @@ -35,59 +35,61 @@ kmx = executable('kmx', objects: [lib.extract_all_objects(recursive: false), kmx_test_source_lib.extract_all_objects(recursive: false)]) tests = [ - 'k_000___null_keyboard', - 'k_001___basic_input_unicodei', - 'k_002___basic_input_unicode', - 'k_003___nul', - 'k_004___basic_input__shift_2_', - 'k_005___nul_with_initial_context', - 'k_006___vkey_input__shift_ctrl_', - 'k_007___vkey_input__ctrl_alt_', - 'k_008___vkey_input__ctrl_alt_2_', - 'k_012___ralt', - 'k_013___deadkeys', - 'k_014___groups_and_virtual_keys', - 'k_015___ralt_2', - 'k_017___space_mnemonic_kbd', - 'k_018___nul_testing', - 'k_019___multiple_deadkeys', - 'k_020___deadkeys_and_backspace', - 'k_021___options', - 'k_022___options_with_preset', - 'k_023___options_with_save', - 'k_024___options_with_save_and_preset', - 'k_025___options_with_reset', - 'k_026___system_stores', - 'k_027___system_stores_2', - 'k_028___smp', - 'k_029___beep', - 'k_030___multiple_groups', - 'k_031___caps_lock', - 'k_032___caps_control', - 'k_033___caps_always_off', - 'k_034___options_double_set_reset', - 'k_035___options_double_set_staged', - 'k_036___options___double_reset_staged', - 'k_037___options___double_reset', - 'k_038___punctkeys', - 'k_039___generic_ctrlalt', - 'k_040___long_context', - 'k_041___long_context_and_deadkeys', - 'k_042___long_context_and_split_deadkeys', - 'k_043___output_and_keystroke', - 'k_044___if_and_context', - 'k_045___deadkey_and_context', - 'k_046___deadkey_and_contextex', - 'k_047___caps_always_off_initially_on', - 'k_048___modifier_keys_keep_context', - 'k_049___enter_invalidates_context', - 'k_050___nul_and_context', - 'k_051___if_and_context', - 'k_052___nul_and_index', - 'k_053___if_and_index', - 'k_054___nul_and_contextex', + 'k_0000___null_keyboard', + 'k_0001___nul', + 'k_0002___nul_with_initial_context', + 'k_0003___nul_testing', + 'k_0004___space_mnemonic_kbd', + 'k_0005___beep', + 'k_0100___basic_input_unicodei', + 'k_0101___basic_input_unicode', + 'k_0102___basic_input__shift_2_', + 'k_0103___vkey_input__shift_ctrl_', + 'k_0104___vkey_input__ctrl_alt_', + 'k_0105___vkey_input__ctrl_alt_2_', + 'k_0106___smp', + 'k_0107___punctkeys', + 'k_0200___ralt', + 'k_0201___ralt_2', + 'k_0203___generic_ctrlalt', + 'k_0300___deadkeys', + 'k_0301___multiple_deadkeys', + 'k_0302___deadkeys_and_backspace', + 'k_0400___groups_and_virtual_keys', + 'k_0401___multiple_groups', + 'k_0402___output_and_keystroke', + 'k_0500___options', + 'k_0501___options_with_preset', + 'k_0502___options_with_save', + 'k_0503___options_with_save_and_preset', + 'k_0504___options_with_reset', + 'k_0505___options_double_set_reset', + 'k_0506___options_double_set_staged', + 'k_0507___options___double_reset_staged', + 'k_0508___options___double_reset', + 'k_0600___system_stores', + 'k_0601___system_stores_2', + 'k_0700___caps_lock', + 'k_0701___caps_control', + 'k_0702___caps_always_off', + 'k_0703___caps_always_off_initially_on', + 'k_0800___long_context', + 'k_0801___long_context_and_deadkeys', + 'k_0802___long_context_and_split_deadkeys', + 'k_0803___if_and_context', + 'k_0804___deadkey_and_context', + 'k_0805___deadkey_and_contextex', + 'k_0806___modifier_keys_keep_context', + 'k_0807___enter_invalidates_context', + 'k_0808___nul_and_context', + 'k_0809___if_and_context', + 'k_0810___nul_and_index', + 'k_0811___if_and_index', + 'k_0812___nul_and_contextex', + # Skipped: 'k_0813___deadkey_cancelled_by_arrow', ] + node = find_program('node', required: true) kmc_root = meson.current_source_dir() / '../../../../developer/src/kmc/build/src/kmc.js' @@ -248,7 +250,7 @@ external_e = executable('ext_event_tests', ['kmx_external_event.tests.cpp', comm dependencies: [icu_uc, icu_i18n], objects: lib.extract_all_objects(recursive: false)) -test_kbd = 'k_033___caps_always_off' +test_kbd = 'k_0702___caps_always_off' kbd_src = common_test_keyboards_baseline + '/' + test_kbd + '.kmn' diff --git a/core/tests/unit/wasm/wasm.tests.js b/core/tests/unit/wasm/wasm.tests.js index 0342c9db96..1f73764539 100644 --- a/core/tests/unit/wasm/wasm.tests.js +++ b/core/tests/unit/wasm/wasm.tests.js @@ -30,10 +30,10 @@ describe('Unit tests for wasm Core API', function () { it('can load keyboard from blob', function () { // Setup - const kmxdata = fs.readFileSync(path.join(__dirname, 'tests/unit/kmx/k_020___deadkeys_and_backspace.kmx')); + const kmxdata = fs.readFileSync(path.join(__dirname, 'tests/unit/kmx/k_0302___deadkeys_and_backspace.kmx')); // Execute - const result = km_core.keyboard_load_from_blob('k_020___deadkeys_and_backspace', kmxdata); + const result = km_core.keyboard_load_from_blob('k_0302___deadkeys_and_backspace', kmxdata); // Verify assert.equal(result.status, 0); @@ -58,7 +58,7 @@ describe('Unit tests for wasm Core API', function () { it('can dispose keyboard', function () { // Setup - const keyboard = loadKeyboard('k_020___deadkeys_and_backspace'); + const keyboard = loadKeyboard('k_0302___deadkeys_and_backspace'); // Execute km_core.keyboard_dispose(keyboard); @@ -66,7 +66,7 @@ describe('Unit tests for wasm Core API', function () { it('can get keyboard attributes', function () { // Setup - const keyboard = loadKeyboard('k_022___options_with_preset'); + const keyboard = loadKeyboard('k_0501___options_with_preset'); // Execute const result = km_core.keyboard_get_attrs(keyboard); @@ -74,14 +74,14 @@ describe('Unit tests for wasm Core API', function () { // Verify assert.equal(result.status, 0); assert.isOk(result.object); - assert.equal(result.object.id, 'k_022___options_with_preset'); + assert.equal(result.object.id, 'k_0501___options_with_preset'); assert.equal(result.object.version_string, '0.0'); assert.deepEqual(result.object.default_options, [{ key: 'foo', value: '0', scope: 1 }]); }); it('can create the state object', function () { // Setup - const keyboard = loadKeyboard('k_020___deadkeys_and_backspace'); + const keyboard = loadKeyboard('k_0302___deadkeys_and_backspace'); // Execute const result = km_core.state_create(keyboard, []); @@ -93,7 +93,7 @@ describe('Unit tests for wasm Core API', function () { it('can dispose the state object', function () { // Setup - const keyboard = loadKeyboard('k_020___deadkeys_and_backspace'); + const keyboard = loadKeyboard('k_0302___deadkeys_and_backspace'); const state = km_core.state_create(keyboard, []); // Execute @@ -102,7 +102,7 @@ describe('Unit tests for wasm Core API', function () { it('can clone the state object', function () { // Setup - const keyboard = loadKeyboard('k_020___deadkeys_and_backspace'); + const keyboard = loadKeyboard('k_0302___deadkeys_and_backspace'); const state = km_core.state_create(keyboard, []); // Execute @@ -116,7 +116,7 @@ describe('Unit tests for wasm Core API', function () { it('can process event', function () { // Setup - const state = createState('k_020___deadkeys_and_backspace'); + const state = createState('k_0302___deadkeys_and_backspace'); // Execute const status = km_core.process_event(state, 0x20, 0, 1, 0); @@ -135,7 +135,7 @@ describe('Unit tests for wasm Core API', function () { it('can set the context', function () { // Setup - const state = createState('k_020___deadkeys_and_backspace'); + const state = createState('k_0302___deadkeys_and_backspace'); // Execute const status = km_core.state_context_set_if_needed(state, 'abc'); @@ -160,7 +160,7 @@ describe('Unit tests for wasm Core API', function () { it('can get and set context items', function () { // Setup - const state = createState('k_020___deadkeys_and_backspace'); + const state = createState('k_0302___deadkeys_and_backspace'); const context = km_core.state_context(state); const data = "Hello, အရှောက်, मानव अधिकारों की सार्वभौम घोषणा"; const contextItems = contextItemsFromString(data); diff --git a/developer/src/kmc-kmn/test/compiler.tests.ts b/developer/src/kmc-kmn/test/compiler.tests.ts index cb190f519d..3fced32b1e 100644 --- a/developer/src/kmc-kmn/test/compiler.tests.ts +++ b/developer/src/kmc-kmn/test/compiler.tests.ts @@ -36,9 +36,9 @@ describe('Compiler class', function() { assert(await compiler.init(callbacks, {saveDebug: true, shouldAddCompilerVersion: false})); assert(compiler.verifyInitialized()); - const fixtureName = baselineDir + 'k_000___null_keyboard.kmx'; - const infile = baselineDir + 'k_000___null_keyboard.kmn'; - const outFile = __dirname + '/k_000___null_keyboard.kmx'; + const fixtureName = baselineDir + 'k_0000___null_keyboard.kmx'; + const infile = baselineDir + 'k_0000___null_keyboard.kmn'; + const outFile = __dirname + '/k_0000___null_keyboard.kmx'; if(fs.existsSync(outFile)) { fs.rmSync(outFile); diff --git a/developer/src/kmc-kmn/test/fixtures/kmw/test_options.kmn b/developer/src/kmc-kmn/test/fixtures/kmw/test_options.kmn index 8f08280614..856d78a9c0 100644 --- a/developer/src/kmc-kmn/test/fixtures/kmw/test_options.kmn +++ b/developer/src/kmc-kmn/test/fixtures/kmw/test_options.kmn @@ -1,4 +1,4 @@ -c Adapted from common baseline test keyboard k_021__options.kmn +c Adapted from common baseline test keyboard k_0500___options.kmn store(&NAME) 'test_options' store(&version) '10.0' diff --git a/developer/src/kmcmplib/tests/meson.build b/developer/src/kmcmplib/tests/meson.build index e0a042ece4..7d90e03cf0 100644 --- a/developer/src/kmcmplib/tests/meson.build +++ b/developer/src/kmcmplib/tests/meson.build @@ -29,57 +29,58 @@ kmcompxtest = executable('kmcompxtests', ['kmcompx.tests.cpp','util_filesystem.c # Test keyboards that we have in Core tests = [ - 'k_000___null_keyboard', - 'k_001___basic_input_unicodei', - 'k_002___basic_input_unicode', - 'k_003___nul', - 'k_004___basic_input__shift_2_', - 'k_005___nul_with_initial_context', - 'k_006___vkey_input__shift_ctrl_', - 'k_007___vkey_input__ctrl_alt_', - 'k_008___vkey_input__ctrl_alt_2_', - 'k_012___ralt', - 'k_013___deadkeys', - 'k_014___groups_and_virtual_keys', - 'k_015___ralt_2', - 'k_017___space_mnemonic_kbd', - 'k_018___nul_testing', - 'k_019___multiple_deadkeys', - 'k_020___deadkeys_and_backspace', - 'k_021___options', - 'k_022___options_with_preset', - 'k_023___options_with_save', - 'k_024___options_with_save_and_preset', - 'k_025___options_with_reset', - 'k_026___system_stores', - 'k_027___system_stores_2', - 'k_028___smp', - 'k_029___beep', - 'k_030___multiple_groups', - 'k_031___caps_lock', - 'k_032___caps_control', - 'k_033___caps_always_off', - 'k_034___options_double_set_reset', - 'k_035___options_double_set_staged', - 'k_036___options___double_reset_staged', - 'k_037___options___double_reset', - 'k_038___punctkeys', - 'k_039___generic_ctrlalt', - 'k_040___long_context', - 'k_041___long_context_and_deadkeys', - 'k_042___long_context_and_split_deadkeys', - 'k_043___output_and_keystroke', - 'k_044___if_and_context', - 'k_045___deadkey_and_context', - 'k_046___deadkey_and_contextex', - 'k_047___caps_always_off_initially_on', - 'k_048___modifier_keys_keep_context', - 'k_049___enter_invalidates_context', - 'k_050___nul_and_context', - 'k_051___if_and_context', - 'k_052___nul_and_index', - 'k_053___if_and_index', - 'k_054___nul_and_contextex', + 'k_0000___null_keyboard', + 'k_0001___nul', + 'k_0002___nul_with_initial_context', + 'k_0003___nul_testing', + 'k_0004___space_mnemonic_kbd', + 'k_0005___beep', + 'k_0100___basic_input_unicodei', + 'k_0101___basic_input_unicode', + 'k_0102___basic_input__shift_2_', + 'k_0103___vkey_input__shift_ctrl_', + 'k_0104___vkey_input__ctrl_alt_', + 'k_0105___vkey_input__ctrl_alt_2_', + 'k_0106___smp', + 'k_0107___punctkeys', + 'k_0200___ralt', + 'k_0201___ralt_2', + 'k_0203___generic_ctrlalt', + 'k_0300___deadkeys', + 'k_0301___multiple_deadkeys', + 'k_0302___deadkeys_and_backspace', + 'k_0400___groups_and_virtual_keys', + 'k_0401___multiple_groups', + 'k_0402___output_and_keystroke', + 'k_0500___options', + 'k_0501___options_with_preset', + 'k_0502___options_with_save', + 'k_0503___options_with_save_and_preset', + 'k_0504___options_with_reset', + 'k_0505___options_double_set_reset', + 'k_0506___options_double_set_staged', + 'k_0507___options___double_reset_staged', + 'k_0508___options___double_reset', + 'k_0600___system_stores', + 'k_0601___system_stores_2', + 'k_0700___caps_lock', + 'k_0701___caps_control', + 'k_0702___caps_always_off', + 'k_0703___caps_always_off_initially_on', + 'k_0800___long_context', + 'k_0801___long_context_and_deadkeys', + 'k_0802___long_context_and_split_deadkeys', + 'k_0803___if_and_context', + 'k_0804___deadkey_and_context', + 'k_0805___deadkey_and_contextex', + 'k_0806___modifier_keys_keep_context', + 'k_0807___enter_invalidates_context', + 'k_0808___nul_and_context', + 'k_0809___if_and_context', + 'k_0810___nul_and_index', + 'k_0811___if_and_index', + 'k_0812___nul_and_contextex', + 'k_0813___deadkey_cancelled_by_arrow', ] foreach kbd : tests diff --git a/docs/settings/linux/launch.json b/docs/settings/linux/launch.json index 1ddd8d7334..40a622645f 100644 --- a/docs/settings/linux/launch.json +++ b/docs/settings/linux/launch.json @@ -20,7 +20,7 @@ "name": "Launch kmx unit tests", "target": "build/arch/debug/tests/unit/kmx/kmx", "cwd": "${workspaceRoot}/core/", - "arguments": "tests/unit/kmx/k_033___caps_always_off.km{n,x}", + "arguments": "tests/unit/kmx/k_0702___caps_always_off.km{n,x}", "valuesFormatting": "parseText" }, { @@ -40,7 +40,7 @@ "valuesFormatting": "parseText" }, { - // start: linux/ibus-keyman/tests/scripts/run-tests.sh --remote-debug --no-surrounding-text --no-wayland -- k_001___basic_input_unicodei + // start: linux/ibus-keyman/tests/scripts/run-tests.sh --remote-debug --no-surrounding-text --no-wayland -- k_0100___basic_input_unicodei // then attach debugger in vscode "type": "gdb", "request": "attach", @@ -58,7 +58,7 @@ } }, { - // - Run Docker container with `resources/docker-images/run.sh --remote-debug :linux -- linux/ibus-keyman/tests/scripts/run-tests.sh --no-x11 --remote-debug -- --directory /home/build/.local/share/keyman/test_kmx k_001___basic_input_unicodei` + // - Run Docker container with `resources/docker-images/run.sh --remote-debug :linux -- linux/ibus-keyman/tests/scripts/run-tests.sh --no-x11 --remote-debug -- --directory /home/build/.local/share/keyman/test_kmx k_0100___basic_input_unicodei` // - then attach debugger in vscode "type": "gdb", "request": "attach", diff --git a/linux/ibus-keyman/tests/README.md b/linux/ibus-keyman/tests/README.md index 0bee95e3b8..90bd8e7e09 100644 --- a/linux/ibus-keyman/tests/README.md +++ b/linux/ibus-keyman/tests/README.md @@ -22,7 +22,7 @@ To run a single test you pass the testname (as found in `common/test/keyboards/baseline`). Multiple tests should be separated by space. ```bash -scripts/run-tests.sh -- k_000___null_keyboard k_005___nul_with_initial_context +scripts/run-tests.sh -- k_0000___null_keyboard k_0002___nul_with_initial_context ``` ## Debugging tests @@ -39,7 +39,7 @@ For example: ```bash linux/ibus-keyman/tests/scripts/run-tests.sh --remote-debug \ - --no-surrounding-text --no-wayland -- k_001___basic_input_unicodei + --no-surrounding-text --no-wayland -- k_0100___basic_input_unicodei ``` On the host, you can then attach to the VM. See the diff --git a/linux/ibus-keyman/tests/testfixture.cpp b/linux/ibus-keyman/tests/testfixture.cpp index f92fe59403..a28d67c273 100644 --- a/linux/ibus-keyman/tests/testfixture.cpp +++ b/linux/ibus-keyman/tests/testfixture.cpp @@ -300,8 +300,8 @@ main(int argc, char *argv[]) { // Check for tests to skip - #3345 const char *skipReason = NULL; - if (strcmp(filename->str, "k_026___system_stores") == 0 || - strcmp(filename->str, "k_027___system_stores_2") == 0) { + if (strcmp(filename->str, "k_0600___system_stores") == 0 || + strcmp(filename->str, "k_0601___system_stores_2") == 0) { skipReason = "mnemonic keyboards are not yet supported on Linux (#3345)"; } diff --git a/resources/docker-images/README.md b/resources/docker-images/README.md index 2406ba7dee..51de3ff72d 100644 --- a/resources/docker-images/README.md +++ b/resources/docker-images/README.md @@ -154,7 +154,7 @@ For example to debug the integration tests in Docker: ```bash resources/docker-images/run.sh --remote-debug :linux -- linux/ibus-keyman/tests/scripts/run-tests.sh \ - --no-x11 --remote-debug -- --directory /home/build/.local/share/keyman/test_kmx k_001___basic_input_unicodei + --no-x11 --remote-debug -- --directory /home/build/.local/share/keyman/test_kmx k_0100___basic_input_unicodei ``` * then attach debugger in vscode diff --git a/web/src/test/auto/e2e/baseline/baseline.tests.ts b/web/src/test/auto/e2e/baseline/baseline.tests.ts index 8a9994fb04..38e45bb8b1 100644 --- a/web/src/test/auto/e2e/baseline/baseline.tests.ts +++ b/web/src/test/auto/e2e/baseline/baseline.tests.ts @@ -24,12 +24,12 @@ function KeymanRoot(): string { // Tests that are not supported in Web due to missing functionality const testsToSkip = { 'all': new Map([ - ['k_038___punctkeys.kmn', 'Playwright does not support 102nd key'] + ['k_0107___punctkeys.kmn', 'Playwright does not support 102nd key'] ]), '.kmx': new Map([ ]), '.js': new Map([ - ['k_054___nul_and_contextex.kmn', 'contextex is not supported in context() match in Web'] + ['k_0812___nul_and_contextex.kmn', 'contextex is not supported in context() match in Web'] ]), }; @@ -37,55 +37,55 @@ const testsToSkip = { const testsToFix = { // TODO-web-core: fix these tests '.kmx': [ - 'k_000___null_keyboard.kmn', - 'k_006___vkey_input__shift_ctrl_.kmn', - 'k_007___vkey_input__ctrl_alt_.kmn', - 'k_008___vkey_input__ctrl_alt_2_.kmn', - 'k_012___ralt.kmn', - 'k_014___groups_and_virtual_keys.kmn', - 'k_015___ralt_2.kmn', // kmx only - 'k_022___options_with_preset.kmn', - 'k_024___options_with_save_and_preset.kmn', - 'k_025___options_with_reset.kmn', - 'k_026___system_stores.kmn', - 'k_027___system_stores_2.kmn', - 'k_028___smp.kmn', // kmx only - 'k_031___caps_lock.kmn', - 'k_032___caps_control.kmn', - 'k_034___options_double_set_reset.kmn', - 'k_035___options_double_set_staged.kmn', - 'k_036___options___double_reset_staged.kmn', - 'k_037___options___double_reset.kmn', - 'k_039___generic_ctrlalt.kmn', - 'k_049___enter_invalidates_context.kmn', - 'k_055___deadkey_cancelled_by_arrow.kmn', + 'k_0000___null_keyboard.kmn', + 'k_0103___vkey_input__shift_ctrl_.kmn', // kmx only + 'k_0104___vkey_input__ctrl_alt_.kmn', + 'k_0105___vkey_input__ctrl_alt_2_.kmn', // kmx only + 'k_0106___smp.kmn', // kmx only + 'k_0200___ralt.kmn', // kmx only + 'k_0201___ralt_2.kmn', // kmx only + 'k_0203___generic_ctrlalt.kmn', + 'k_0400___groups_and_virtual_keys.kmn', // kmx only + 'k_0501___options_with_preset.kmn', + 'k_0503___options_with_save_and_preset.kmn', + 'k_0504___options_with_reset.kmn', + 'k_0505___options_double_set_reset.kmn', + 'k_0506___options_double_set_staged.kmn', + 'k_0507___options___double_reset_staged.kmn', + 'k_0508___options___double_reset.kmn', + 'k_0600___system_stores.kmn', + 'k_0601___system_stores_2.kmn', + 'k_0700___caps_lock.kmn', + 'k_0701___caps_control.kmn', + 'k_0807___enter_invalidates_context.kmn', + 'k_0813___deadkey_cancelled_by_arrow.kmn', ], // TODO: fix these tests (#15342) '.js': [ - 'k_000___null_keyboard.kmn', - 'k_006___vkey_input__shift_ctrl_.kmn', - 'k_007___vkey_input__ctrl_alt_.kmn', - 'k_008___vkey_input__ctrl_alt_2_.kmn', - 'k_012___ralt.kmn', - 'k_014___groups_and_virtual_keys.kmn', - 'k_022___options_with_preset.kmn', - 'k_024___options_with_save_and_preset.kmn', - 'k_025___options_with_reset.kmn', - 'k_026___system_stores.kmn', - 'k_027___system_stores_2.kmn', - 'k_031___caps_lock.kmn', - 'k_032___caps_control.kmn', - 'k_034___options_double_set_reset.kmn', - 'k_035___options_double_set_staged.kmn', - 'k_036___options___double_reset_staged.kmn', - 'k_037___options___double_reset.kmn', - 'k_039___generic_ctrlalt.kmn', - 'k_041___long_context_and_deadkeys.kmn', // js only - 'k_042___long_context_and_split_deadkeys.kmn', // js only - 'k_049___enter_invalidates_context.kmn', - 'k_050___nul_and_context.kmn', // js only - 'k_052___nul_and_index.kmn', // js only - 'k_055___deadkey_cancelled_by_arrow.kmn', + 'k_0000___null_keyboard.kmn', + // 'k_0103___vkey_input__shift_ctrl_.kmn', + 'k_0104___vkey_input__ctrl_alt_.kmn', + // 'k_0105___vkey_input__ctrl_alt_2_.kmn', + // 'k_0200___ralt.kmn', + 'k_0203___generic_ctrlalt.kmn', + // 'k_0400___groups_and_virtual_keys.kmn', + 'k_0501___options_with_preset.kmn', + 'k_0503___options_with_save_and_preset.kmn', + 'k_0504___options_with_reset.kmn', + 'k_0505___options_double_set_reset.kmn', + 'k_0506___options_double_set_staged.kmn', + 'k_0507___options___double_reset_staged.kmn', + 'k_0508___options___double_reset.kmn', + 'k_0600___system_stores.kmn', + 'k_0601___system_stores_2.kmn', + 'k_0700___caps_lock.kmn', + 'k_0701___caps_control.kmn', + 'k_0801___long_context_and_deadkeys.kmn', // js only + 'k_0802___long_context_and_split_deadkeys.kmn', // js only + 'k_0807___enter_invalidates_context.kmn', + 'k_0808___nul_and_context.kmn', // js only + 'k_0810___nul_and_index.kmn', // js only + 'k_0813___deadkey_cancelled_by_arrow.kmn', ] };