Installable Keyboard Layouts – Developers Technical Note
keyTouch has ability to install a new Unicode keyboard layout via an XML text file.
XML DTD
XML keyboards must follow the XML DTD (Document Type Definition) below:
<!ELEMENT action ( keySequence*,keySequenceRng* ) >
<!ELEMENT altGrKeyMap ( key* ) >
<!ELEMENT capsAndShiftKeyMap ( key* ) >
<!ELEMENT capsKeyMap (key*) >
<!ELEMENT defaultKeyMap (key*) >
<!ELEMENT key EMPTY >
<!ATTLIST key code NMTOKEN #REQUIRED >
<!ATTLIST key output CDATA #REQUIRED >
<!ATTLIST key state NMTOKEN #IMPLIED ><!ELEMENT keySequence EMPTY >
<!ATTLIST keySequence input NMTOKEN #REQUIRED >
<!ATTLIST keySequence newState NMTOKEN #IMPLIED >
<!ATTLIST keySequence output CDATA #REQUIRED >
<!ATTLIST keySequence state NMTOKEN #REQUIRED ><!ELEMENT keySequenceRng EMPTY >
<!ATTLIST keySequenceRng end NMTOKEN #REQUIRED >
<!ATTLIST keySequenceRng newState NMTOKEN #IMPLIED >
<!ATTLIST keySequenceRng output CDATA #REQUIRED >
<!ATTLIST keySequenceRng start NMTOKEN #REQUIRED >
<!ATTLIST keySequenceRng state NMTOKEN #REQUIRED ><!ELEMENT layout (defaultKeyMap, shiftKeyMap, capsKeyMap, capsAndShiftKeyMap, altGrKeyMap, action ) >
<!ATTLIST layout createdby CDATA #REQUIRED >
<!ATTLIST layout info CDATA #REQUIRED >
<!ATTLIST layout name NMTOKEN #REQUIRED >
<!ATTLIST layout version NMTOKEN #REQUIRED ><!ELEMENT shiftKeyMap ( key* ) >
A keyboard layout description is a standard XML file, and so follows the XML specification. The text file encoding should be Unicode UTF-8
<layout> Element
The root element is <layout> , <layout> has following attributes, all are required
name: Name of keyboard kayout. This will be appear in keyboard layout list on KeyTouch configuration page.
version: Version number of the keyboard.
info: Detailed information about keylayout. This wll be appear under Detail on configuration page.
createdby: Creater of ther keyboard layout. (a person or a company name)
Posted on December 7, 2009 · Categorized under Note




