From 8d7629a40fc7f76389d4dca76c0b07ecdff78b3f Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Thu, 17 Aug 2017 14:30:09 +0700 Subject: [PATCH] Fix for #160 --- web/samples/issue160/index.html | 98 +++ web/samples/issue160/issue160-1.0.js | 725 ++++++++++++++++++++++ web/samples/issue160/issue160-1.0.json | 16 + web/samples/issue160/issue160-1.0_load.js | 1 + web/samples/issue160/issue160-layout.js | 685 ++++++++++++++++++++ web/samples/issue160/issue160.kmn | 22 + web/samples/issue160/issue160.kmx | Bin 0 -> 656 bytes web/source/kmwcallback.js | 2 +- web/source/kmwosk.js | 4 +- 9 files changed, 1550 insertions(+), 3 deletions(-) create mode 100644 web/samples/issue160/index.html create mode 100644 web/samples/issue160/issue160-1.0.js create mode 100644 web/samples/issue160/issue160-1.0.json create mode 100644 web/samples/issue160/issue160-1.0_load.js create mode 100644 web/samples/issue160/issue160-layout.js create mode 100644 web/samples/issue160/issue160.kmn create mode 100644 web/samples/issue160/issue160.kmx diff --git a/web/samples/issue160/index.html b/web/samples/issue160/index.html new file mode 100644 index 0000000000..9d3ad45f11 --- /dev/null +++ b/web/samples/issue160/index.html @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + KeymanWeb #160 + + + + + + + + + + + + + + + + + + + + + + + + + + +

KeymanWeb #160

+ +
+ +
+ +

Type in your language in this text area:

+ + +

or in this input field:

+ + +

Return to testing home page

+
+ + + + + diff --git a/web/samples/issue160/issue160-1.0.js b/web/samples/issue160/issue160-1.0.js new file mode 100644 index 0000000000..acf5e7672e --- /dev/null +++ b/web/samples/issue160/issue160-1.0.js @@ -0,0 +1,725 @@ +KeymanWeb.KR(new Keyboard_issue160()); +function Keyboard_issue160() +{ + this.KI="Keyboard_issue160"; + this.KN="#160 VKDictionary conflict(web/touch)"; + this.KV=null; + this.KH=''; + this.KM=0; + this.KBVER="1.0"; + this.KVKD="T_A_Hook T_A_Candrabindu T_A_Blah U_0104 T_A_305"; + this.KVKL={ + "tablet": { + "font": "Tahoma", + "layer": [ + { + "id": "default", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_Q", + "text": "q" + }, + { + "id": "K_W", + "text": "w" + }, + { + "id": "K_E", + "text": "e" + }, + { + "id": "K_R", + "text": "r" + }, + { + "id": "K_T", + "text": "t" + }, + { + "id": "K_Y", + "text": "y" + }, + { + "id": "K_U", + "text": "u" + }, + { + "id": "K_I", + "text": "i" + }, + { + "id": "K_O", + "text": "o" + }, + { + "id": "K_P", + "text": "p" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_A", + "text": "a", + "pad": 70 + }, + { + "id": "U_0101", + "text": "ā" + }, + { + "id": "T_A_Hook", + "text": "a̧" + }, + { + "id": "T_A_Candrabindu", + "text": "a̐" + }, + { + "id": "U_0104", + "text": "Ą" + }, + { + "id": "K_H", + "text": "h", + "sk": [ + { + "text": "ă", + "id": "U_0103" + }, + { + "text": "a̅", + "id": "T_A_305" + } + ] + }, + { + "id": "K_J", + "text": "j" + }, + { + "id": "K_K", + "text": "k" + }, + { + "id": "K_L", + "text": "l" + }, + { + "id": "T_new_20", + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "1", + "nextlayer": "shift" + }, + { + "id": "K_Z", + "text": "z" + }, + { + "id": "K_X", + "text": "x" + }, + { + "id": "K_C", + "text": "c" + }, + { + "id": "K_V", + "text": "v" + }, + { + "id": "K_B", + "text": "b" + }, + { + "id": "K_N", + "text": "n" + }, + { + "id": "K_M", + "text": "m" + }, + { + "id": "K_PERIOD", + "text": ".", + "sk": [ + { + "text": ",", + "id": "K_COMMA" + }, + { + "text": "!", + "id": "K_1", + "layer": "shift" + }, + { + "text": "?", + "id": "K_SLASH", + "layer": "shift" + }, + { + "text": "'", + "id": "K_QUOTE" + }, + { + "text": "\"", + "id": "K_QUOTE", + "layer": "shift" + }, + { + "text": "\\", + "id": "K_BKSLASH" + }, + { + "text": ":", + "id": "K_COLON", + "layer": "shift" + }, + { + "text": ";", + "id": "K_COLON" + } + ] + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "140", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "630", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + }, + { + "id": "shift", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_Q", + "text": "Q" + }, + { + "id": "K_W", + "text": "W" + }, + { + "id": "K_E", + "text": "E" + }, + { + "id": "K_R", + "text": "R" + }, + { + "id": "K_T", + "text": "T" + }, + { + "id": "K_Y", + "text": "Y" + }, + { + "id": "K_U", + "text": "U" + }, + { + "id": "K_I", + "text": "I" + }, + { + "id": "K_O", + "text": "O" + }, + { + "id": "K_P", + "text": "P" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_A", + "text": "A", + "pad": 70 + }, + { + "id": "U_0101", + "text": "ā" + }, + { + "id": "T_A_Hook", + "text": "a̧" + }, + { + "id": "T_A_Candrabindu", + "text": "a̐" + }, + { + "id": "U_0104", + "text": "Ą" + }, + { + "id": "K_H", + "text": "h", + "sk": [ + { + "text": "ă", + "id": "U_0103" + }, + { + "text": "a̅", + "id": "T_A_305" + } + ] + }, + { + "id": "K_J", + "text": "J" + }, + { + "id": "K_K", + "text": "K" + }, + { + "id": "K_L", + "text": "L" + }, + { + "id": "T_new_54", + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "2", + "nextlayer": "default" + }, + { + "id": "K_Z", + "text": "Z" + }, + { + "id": "K_X", + "text": "X" + }, + { + "id": "K_C", + "text": "C" + }, + { + "id": "K_V", + "text": "V" + }, + { + "id": "K_B", + "text": "B" + }, + { + "id": "K_N", + "text": "N" + }, + { + "id": "K_M", + "text": "M" + }, + { + "id": "K_PERIOD", + "text": ".", + "sk": [ + { + "text": ",", + "id": "K_COMMA", + "layer": "default" + }, + { + "text": "!", + "id": "K_1", + "layer": "shift" + }, + { + "text": "?", + "id": "K_SLASH", + "layer": "shift" + }, + { + "text": "'", + "id": "K_QUOTE", + "layer": "default" + }, + { + "text": "\"", + "id": "K_QUOTE", + "layer": "shift" + }, + { + "text": "\\", + "id": "K_BKSLASH", + "layer": "default" + }, + { + "text": ":", + "id": "K_COLON" + }, + { + "text": ";", + "id": "K_COLON", + "layer": "default" + } + ] + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "140", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "630", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + }, + { + "id": "numeric", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_1", + "text": "1" + }, + { + "id": "K_2", + "text": "2" + }, + { + "id": "K_3", + "text": "3" + }, + { + "id": "K_4", + "text": "4" + }, + { + "id": "K_5", + "text": "5" + }, + { + "id": "K_6", + "text": "6" + }, + { + "id": "K_7", + "text": "7" + }, + { + "id": "K_8", + "text": "8" + }, + { + "id": "K_9", + "text": "9" + }, + { + "id": "K_0", + "text": "0" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_4", + "layer": "shift", + "pad": 70, + "text": "$" + }, + { + "id": "K_2", + "layer": "shift", + "text": "@" + }, + { + "id": "K_3", + "layer": "shift", + "text": "#" + }, + { + "id": "K_5", + "layer": "shift", + "text": "%" + }, + { + "id": "K_7", + "layer": "shift", + "text": "&" + }, + { + "id": "K_HYPHEN", + "layer": "shift", + "text": "_" + }, + { + "id": "K_EQUAL", + "layer": "default", + "text": "=" + }, + { + "id": "K_BKSLASH", + "layer": "shift", + "text": "|" + }, + { + "id": "K_BKSLASH", + "layer": "default", + "text": "\\" + }, + { + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "1" + }, + { + "id": "K_LBRKT", + "sk": [ + { + "id": "U_00AB", + "text": "«" + }, + { + "id": "K_COMMA", + "text": "<", + "layer": "shift" + }, + { + "id": "K_LBRKT", + "text": "{", + "layer": "shift" + } + ], + "text": "[" + }, + { + "id": "K_9", + "layer": "shift", + "text": "(" + }, + { + "id": "K_0", + "layer": "shift", + "text": ")" + }, + { + "id": "K_RBRKT", + "sk": [ + { + "id": "U_00BB", + "text": "»" + }, + { + "id": "K_PERIOD", + "text": ">", + "layer": "shift" + }, + { + "id": "K_RBRKT", + "text": "}", + "layer": "shift" + } + ], + "text": "]" + }, + { + "id": "K_EQUAL", + "layer": "shift", + "text": "+" + }, + { + "id": "K_HYPHEN", + "layer": "default", + "text": "-" + }, + { + "id": "K_8", + "layer": "shift", + "text": "*" + }, + { + "id": "K_SLASH", + "layer": "default", + "text": "/" + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_LOWER", + "text": "*abc*", + "width": "140", + "sp": "1", + "nextlayer": "default" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "width": "630", + "sp": "0", + "text": "" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + } + ] + } +} +; + this.KVER="10.0.920.0"; + this.gs=function(t,e) { + return this.g_main(t,e); + }; + this.g_main=function(t,e) { + var k=KeymanWeb,r=0,m=0; + if(k.KKM(e,16384,259)&&k.KCM(1,t,"c",1)) { // Line 21 + r=m=1; + k.KO(1,t,"?"); + } + else if(k.KKM(e,16384,256)) { // Line 17 + r=m=1; + k.KO(0,t,"a̧"); + } + else if(k.KKM(e,16384,257)) { // Line 18 + r=m=1; + k.KO(0,t,"a̐"); + } + else if(k.KKM(e,16384,258)) { // Line 19 + r=m=1; + k.KO(0,t,"nothing"); + } + else if(k.KKM(e,16384,260)) { // Line 22 + r=m=1; + k.KO(0,t,"a̅"); + } + return r; + }; +} diff --git a/web/samples/issue160/issue160-1.0.json b/web/samples/issue160/issue160-1.0.json new file mode 100644 index 0000000000..74104ca15b --- /dev/null +++ b/web/samples/issue160/issue160-1.0.json @@ -0,0 +1,16 @@ +{ + "options" : { + "device" : "any", + "keyboardBaseUri" : "http://your-host-here/keyboard-path/", + "fontBaseUri" : "http://your-host-here/font-path/" + }, + "keyboard" : { + "id" : "issue160", + "name" : "#160 VKDictionary conflict(web/touch)", + "filename" : "issue160-1.0.js", + "version" : "1.0", + "lastModified" : "2017-08-16T11:43:46.620+07:00", + "languages" : [ + ] + } +} diff --git a/web/samples/issue160/issue160-1.0_load.js b/web/samples/issue160/issue160-1.0_load.js new file mode 100644 index 0000000000..0655539d77 --- /dev/null +++ b/web/samples/issue160/issue160-1.0_load.js @@ -0,0 +1 @@ +KeymanWeb.KRS(new Stub_Keyboard_issue160()); function Stub_Keyboard_issue160() {this.KF="issue160-1.0.js";this.KI="Keyboard_issue160";this.KN="#160 VKDictionary conflict(web/touch)";} \ No newline at end of file diff --git a/web/samples/issue160/issue160-layout.js b/web/samples/issue160/issue160-layout.js new file mode 100644 index 0000000000..7bff703bda --- /dev/null +++ b/web/samples/issue160/issue160-layout.js @@ -0,0 +1,685 @@ +{ + "tablet": { + "font": "Tahoma", + "layer": [ + { + "id": "default", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_Q", + "text": "q" + }, + { + "id": "K_W", + "text": "w" + }, + { + "id": "K_E", + "text": "e" + }, + { + "id": "K_R", + "text": "r" + }, + { + "id": "K_T", + "text": "t" + }, + { + "id": "K_Y", + "text": "y" + }, + { + "id": "K_U", + "text": "u" + }, + { + "id": "K_I", + "text": "i" + }, + { + "id": "K_O", + "text": "o" + }, + { + "id": "K_P", + "text": "p" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_A", + "text": "a", + "pad": 70 + }, + { + "id": "U_0101", + "text": "ā" + }, + { + "id": "T_A_Hook", + "text": "a̧" + }, + { + "id": "T_A_Candrabindu", + "text": "a̐" + }, + { + "id": "U_0104", + "text": "Ą" + }, + { + "id": "K_H", + "text": "h", + "sk": [ + { + "text": "ă", + "id": "U_0103" + }, + { + "text": "a̅", + "id": "T_A_305" + } + ] + }, + { + "id": "K_J", + "text": "j" + }, + { + "id": "K_K", + "text": "k" + }, + { + "id": "K_L", + "text": "l" + }, + { + "id": "T_new_20", + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "1", + "nextlayer": "shift" + }, + { + "id": "K_Z", + "text": "z" + }, + { + "id": "K_X", + "text": "x" + }, + { + "id": "K_C", + "text": "c" + }, + { + "id": "K_V", + "text": "v" + }, + { + "id": "K_B", + "text": "b" + }, + { + "id": "K_N", + "text": "n" + }, + { + "id": "K_M", + "text": "m" + }, + { + "id": "K_PERIOD", + "text": ".", + "sk": [ + { + "text": ",", + "id": "K_COMMA" + }, + { + "text": "!", + "id": "K_1", + "layer": "shift" + }, + { + "text": "?", + "id": "K_SLASH", + "layer": "shift" + }, + { + "text": "'", + "id": "K_QUOTE" + }, + { + "text": "\"", + "id": "K_QUOTE", + "layer": "shift" + }, + { + "text": "\\", + "id": "K_BKSLASH" + }, + { + "text": ":", + "id": "K_COLON", + "layer": "shift" + }, + { + "text": ";", + "id": "K_COLON" + } + ] + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "140", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "630", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + }, + { + "id": "shift", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_Q", + "text": "Q" + }, + { + "id": "K_W", + "text": "W" + }, + { + "id": "K_E", + "text": "E" + }, + { + "id": "K_R", + "text": "R" + }, + { + "id": "K_T", + "text": "T" + }, + { + "id": "K_Y", + "text": "Y" + }, + { + "id": "K_U", + "text": "U" + }, + { + "id": "K_I", + "text": "I" + }, + { + "id": "K_O", + "text": "O" + }, + { + "id": "K_P", + "text": "P" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_A", + "text": "A", + "pad": 70 + }, + { + "id": "U_0101", + "text": "ā" + }, + { + "id": "T_A_Hook", + "text": "a̧" + }, + { + "id": "T_A_Candrabindu", + "text": "a̐" + }, + { + "id": "U_0104", + "text": "Ą" + }, + { + "id": "K_H", + "text": "h", + "sk": [ + { + "text": "ă", + "id": "U_0103" + }, + { + "text": "a̅", + "id": "T_A_305" + } + ] + }, + { + "id": "K_J", + "text": "J" + }, + { + "id": "K_K", + "text": "K" + }, + { + "id": "K_L", + "text": "L" + }, + { + "id": "T_new_54", + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "2", + "nextlayer": "default" + }, + { + "id": "K_Z", + "text": "Z" + }, + { + "id": "K_X", + "text": "X" + }, + { + "id": "K_C", + "text": "C" + }, + { + "id": "K_V", + "text": "V" + }, + { + "id": "K_B", + "text": "B" + }, + { + "id": "K_N", + "text": "N" + }, + { + "id": "K_M", + "text": "M" + }, + { + "id": "K_PERIOD", + "text": ".", + "sk": [ + { + "text": ",", + "id": "K_COMMA", + "layer": "default" + }, + { + "text": "!", + "id": "K_1", + "layer": "shift" + }, + { + "text": "?", + "id": "K_SLASH", + "layer": "shift" + }, + { + "text": "'", + "id": "K_QUOTE", + "layer": "default" + }, + { + "text": "\"", + "id": "K_QUOTE", + "layer": "shift" + }, + { + "text": "\\", + "id": "K_BKSLASH", + "layer": "default" + }, + { + "text": ":", + "id": "K_COLON" + }, + { + "text": ";", + "id": "K_COLON", + "layer": "default" + } + ] + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_NUMLOCK", + "text": "*123*", + "width": "140", + "sp": "1", + "nextlayer": "numeric" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "text": "", + "width": "630", + "sp": "0" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + }, + { + "id": "numeric", + "row": [ + { + "id": 1, + "key": [ + { + "id": "K_1", + "text": "1" + }, + { + "id": "K_2", + "text": "2" + }, + { + "id": "K_3", + "text": "3" + }, + { + "id": "K_4", + "text": "4" + }, + { + "id": "K_5", + "text": "5" + }, + { + "id": "K_6", + "text": "6" + }, + { + "id": "K_7", + "text": "7" + }, + { + "id": "K_8", + "text": "8" + }, + { + "id": "K_9", + "text": "9" + }, + { + "id": "K_0", + "text": "0" + } + ] + }, + { + "id": 2, + "key": [ + { + "id": "K_4", + "layer": "shift", + "pad": 70, + "text": "$" + }, + { + "id": "K_2", + "layer": "shift", + "text": "@" + }, + { + "id": "K_3", + "layer": "shift", + "text": "#" + }, + { + "id": "K_5", + "layer": "shift", + "text": "%" + }, + { + "id": "K_7", + "layer": "shift", + "text": "&" + }, + { + "id": "K_HYPHEN", + "layer": "shift", + "text": "_" + }, + { + "id": "K_EQUAL", + "layer": "default", + "text": "=" + }, + { + "id": "K_BKSLASH", + "layer": "shift", + "text": "|" + }, + { + "id": "K_BKSLASH", + "layer": "default", + "text": "\\" + }, + { + "text": "", + "width": "10", + "sp": "10" + } + ] + }, + { + "id": 3, + "key": [ + { + "id": "K_SHIFT", + "text": "*Shift*", + "width": "110", + "sp": "1" + }, + { + "id": "K_LBRKT", + "sk": [ + { + "id": "U_00AB", + "text": "«" + }, + { + "id": "K_COMMA", + "text": "<", + "layer": "shift" + }, + { + "id": "K_LBRKT", + "text": "{", + "layer": "shift" + } + ], + "text": "[" + }, + { + "id": "K_9", + "layer": "shift", + "text": "(" + }, + { + "id": "K_0", + "layer": "shift", + "text": ")" + }, + { + "id": "K_RBRKT", + "sk": [ + { + "id": "U_00BB", + "text": "»" + }, + { + "id": "K_PERIOD", + "text": ">", + "layer": "shift" + }, + { + "id": "K_RBRKT", + "text": "}", + "layer": "shift" + } + ], + "text": "]" + }, + { + "id": "K_EQUAL", + "layer": "shift", + "text": "+" + }, + { + "id": "K_HYPHEN", + "layer": "default", + "text": "-" + }, + { + "id": "K_8", + "layer": "shift", + "text": "*" + }, + { + "id": "K_SLASH", + "layer": "default", + "text": "/" + }, + { + "id": "K_BKSP", + "text": "*BkSp*", + "width": "90", + "sp": "1" + } + ] + }, + { + "id": 4, + "key": [ + { + "id": "K_LOWER", + "text": "*abc*", + "width": "140", + "sp": "1", + "nextlayer": "default" + }, + { + "id": "K_LOPT", + "text": "*Menu*", + "width": "120", + "sp": "1" + }, + { + "id": "K_SPACE", + "width": "630", + "sp": "0", + "text": "" + }, + { + "id": "K_ENTER", + "text": "*Enter*", + "width": "140", + "sp": "1" + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/web/samples/issue160/issue160.kmn b/web/samples/issue160/issue160.kmn new file mode 100644 index 0000000000..7501d9cf09 --- /dev/null +++ b/web/samples/issue160/issue160.kmn @@ -0,0 +1,22 @@ +c +c 1. Press key marked 'Ą'; should output 'Ą' unless preceded by 'c' +c but outputs U+0103 because of its VKDictionary index +c +c 2. Press key marked 'ā'; should output 'ā' but instead puts out 'a̐' +c because it conflicts with a VKDictionary index +c + +store(&VERSION) '9.0' +store(&NAME) '#160 VKDictionary conflict(web/touch)' +store(&LAYOUTFILE) 'issue160-layout.js' +store(&TARGETS) 'mobile' +begin Unicode > use(main) + +group(main) using keys + ++ [T_A_Hook] > 'a' U+0327 ++ [T_A_Candrabindu] > 'a' U+0310 ++ [T_A_Blah] > 'nothing' c just here to keep 0104 in sync +c + [U_0101] > '***' +'c' + [U_0104] > '?' ++ [T_A_305] > 'a' U+0305 diff --git a/web/samples/issue160/issue160.kmx b/web/samples/issue160/issue160.kmx new file mode 100644 index 0000000000000000000000000000000000000000..9667d3421457e47db23a77601398e93a6671b6a7 GIT binary patch literal 656 zcmZvZOG`pw5Qbkhx@;<<%PtNDWkID8fvXH%1TM2^7bi8eizkjJLy%U{GTQV9TDNM| zzpH0Hze1sr`R19+d1t`NS@l>`(&x-uQCP|zjFRIbaXc-3W8j~?QZri^1bq+}Jx?RD z5dpvvpiOZFCsUSS5Di`3)=N8qDHi&f}67Y^4g~#=#+^vIyH6=)IyYdbZSoflD&g& zmJ1uY&<>N4?&&wR!3MjsM{IFVhkC>=>~68Ej$WV>rgKg$Ka%aS!))3AqsC)+3eVVMR+QTGW1AVOb; 255) keyCode = e.vkCode; // added to support extended (touch-hold) keys for mnemonic layouts - if(e.LisVirtualKey || keyCode > 255) // added keyCode test for same reason + if(e.LisVirtualKey) { if((Lruleshift & 0x4000) == 0x4000 || (keyCode > 255)) // added keyCode test to support extended keys { diff --git a/web/source/kmwosk.js b/web/source/kmwosk.js index 055517be48..32ad1b7b29 100644 --- a/web/source/kmwosk.js +++ b/web/source/kmwosk.js @@ -700,8 +700,8 @@ if(!window['tavultesoft']['keymanweb']['initialized']) { // TODO: Refactor the overloading of the 'n' parameter here into separate methods. // Test for fall back to U_xxxx key id - For this first test, we refer to Unicode values. - if((keyName.substr(0,2) == 'U_') && (n > osk.keyCodes['K_SPACE']) && !(n>127 && n<160)) { // 127 - 160 refer to Unicode control codes. - ch=String.fromCharCode(n); + if((keyName.substr(0,2) == 'U_') && ((keyShiftState == 0) || (n > osk.keyCodes['K_SPACE']) && !(n>127 && n<160))) { // 127 - 160 refer to Unicode control codes. + ch=String.fromCharCode(parseInt(keyName.substr(2,6),16)); // Hereafter, we refer to keycodes. } else if(n >= osk.keyCodes['K_0'] && n <= osk.keyCodes['K_9']) { // The number keys. ch = codesUS[keyShiftState][0][n-osk.keyCodes['K_0']];