mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 00:27:40 +00:00
Fix for #160
This commit is contained in:
parent
e35ab51d6d
commit
8d7629a40f
9 changed files with 1550 additions and 3 deletions
98
web/samples/issue160/index.html
Normal file
98
web/samples/issue160/index.html
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Set the viewport width to match phone and tablet device widths -->
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no" />
|
||||
|
||||
<!-- Allow KeymanWeb to be saved to the iPhone home screen -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<!-- Enable IE9 Standards mode -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<title>KeymanWeb #160</title>
|
||||
|
||||
<!-- Your page CSS -->
|
||||
<style type='text/css'>
|
||||
body {font-family: Tahoma,helvetica;}
|
||||
h3 {font-size: 1em;font-weight:normal;color: darkred; margin-bottom: 4px}
|
||||
.test {font-size: 1.5em; width:80%; min-height:30px; border: 1px solid gray;}
|
||||
#KeymanWebControl {width:50%;min-width:600px;}
|
||||
</style>
|
||||
|
||||
<!-- Insert uncompiled KeymanWeb source scripts -->
|
||||
<script src="../../source/kmwstring.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwbase.js" type="application/javascript"></script>
|
||||
<script src="../../source/keymanweb.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwosk.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwnative.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwcallback.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwkeymaps.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwlayout.js" type="application/javascript"></script>
|
||||
<script src="../../source/kmwinit.js" type="application/javascript"></script>
|
||||
|
||||
<!--
|
||||
For desktop browsers, a script for the user interface must be inserted here.
|
||||
|
||||
Standard UIs are toggle, button, float and toolbar.
|
||||
The toolbar UI is best for any page designed to support keyboards for
|
||||
a large number of languages.
|
||||
-->
|
||||
<script src="../../source/kmwuitoggle.js"></script>
|
||||
|
||||
<!-- Initialization: set paths to keyboards, resources and fonts as required -->
|
||||
<script>
|
||||
var kmw=window.tavultesoft.keymanweb;
|
||||
kmw.init({
|
||||
resources:'resources'
|
||||
});
|
||||
kmw.addKeyboards(
|
||||
{id:'issue160',name:'Issue 160',language:{id:'eng',name:'English'}, filename:'./issue160-1.0.js'},
|
||||
{id:'tchaduni',name:'tchaduni',language:{id:'fra',name:'TChad'}, filename:'./tchaduni-3.1.js'}
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<!-- Sample page HTML -->
|
||||
<body>
|
||||
<h2>KeymanWeb #160</h2>
|
||||
|
||||
<div>
|
||||
<!--
|
||||
The following DIV is used to position the Button or Toolbar User Interfaces on the page.
|
||||
If omitted, those User Interfaces will appear at the top of the document body.
|
||||
(It is ignored by other User Interfaces.)
|
||||
-->
|
||||
<div id='KeymanWebControl'></div>
|
||||
|
||||
<h3>Type in your language in this text area:</h3>
|
||||
<textarea id='ta1' class='test' placeholder='Type here'></textarea>
|
||||
|
||||
<h3>or in this input field:</h3>
|
||||
<input class='test' value='' placeholder='or here'/>
|
||||
|
||||
<h3><a href="../samples/index.html">Return to testing home page</a></h3>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<!--
|
||||
*** DEVELOPER NOTE -- FIREFOX CONFIGURATION FOR TESTING ***
|
||||
*
|
||||
* If the URL bar starts with <b>file://</b>, Firefox may not load the font used
|
||||
* to display the special characters used in the On-Screen Keyboard.
|
||||
*
|
||||
* To work around this Firefox bug, navigate to <b>about:config</b>
|
||||
* and set <b>security.fileuri.strict_origin_policy</b> to <b>false</b>
|
||||
* while testing.
|
||||
*
|
||||
* Firefox resolves website-based CSS URI references correctly without needing
|
||||
* any configuration change, so this change should only be made for file-based testing.
|
||||
*
|
||||
***
|
||||
-->
|
||||
</html>
|
||||
725
web/samples/issue160/issue160-1.0.js
Normal file
725
web/samples/issue160/issue160-1.0.js
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
16
web/samples/issue160/issue160-1.0.json
Normal file
16
web/samples/issue160/issue160-1.0.json
Normal file
|
|
@ -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" : [
|
||||
]
|
||||
}
|
||||
}
|
||||
1
web/samples/issue160/issue160-1.0_load.js
Normal file
1
web/samples/issue160/issue160-1.0_load.js
Normal file
|
|
@ -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)";}
|
||||
685
web/samples/issue160/issue160-layout.js
Normal file
685
web/samples/issue160/issue160-layout.js
Normal file
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
22
web/samples/issue160/issue160.kmn
Normal file
22
web/samples/issue160/issue160.kmn
Normal file
|
|
@ -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
|
||||
BIN
web/samples/issue160/issue160.kmx
Normal file
BIN
web/samples/issue160/issue160.kmx
Normal file
Binary file not shown.
|
|
@ -292,7 +292,7 @@ if(!window['tavultesoft']['keymanweb']['initialized']) {
|
|||
|
||||
if(e.vkCode > 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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']];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue