![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Products | ![]() |
Download![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() |
back | index | next Appendix AKeyboard Mapping File FormatThe Keyboard Mapping file has two sections, [KEYS] and [COMPOSERS_XKK], each consisting of keysym statements and possible comments. Text entered after a ';' sign is ignored and will be treated as a comment. A keysym specification uses a set of standard X numbers to describe a symbol. For example, a lowercase 'a' has a special number code. The KEYS SectionIn the [KEYS] section, each keysym statement associates a set of one to four keysyms with a physical key. Synopsis of a statement is: KEYnn = keysym1 [, keysym2 [, keysym3 [, keysym4]]] 'nn' is the identifying number of a PC's key. Every PC's key has an entry in the section. The entry name is the text KEY followed by the decimal ScanCode number (key_number) and followed by the letter 'E' if the key has the extended flag set. keysym1 is the keysym associated with the key in a non-shifted state (Normal). This is the only parameter that must be entered. keysym2 is the keysym associated with the key when the key is Shifted. keysym3 is the keysym associated with the key when a Mode-Shift key is pressed (Alt-Gr). keysym4 is the keysym associated with the Shift + Mode-Shift sequence (Shift + Alt-Gr). A Mode-Shift is a physical key which has a keysym value of 0xFF7E, (predefined as the ModeSwitch symbol), and which is assigned to one of the modifiers MOD1 to MOD5. A full keysym specification consists of four numbers, each of which is in the range of 0 through 255 decimal (or 0x00 through 0xFF hex). The standard predefined X keysyms use only the third and fourth numbers. The first two numbers are assumed to be zero. WinaXe Plus accepts keysyms in the following three formats:
Examples:
[KEYS] Examples of re-mappingSuppose that you selected to use the us.kmf file (with XSettings) and you want to change the keyboard mapping for Up(8) and Down(2) keys of the additional keyboard and for the F1 key. You can find the following lines in the us.kmf file for them:
KEY59 = 0xffbe, 0xffbe ; (XK_F1,XK_F1) By using the xev or xmodmap -pk commands on the SUN host, you can get keysyms for all keys. For example, you choose:
Help=0xff6a; If you modify the lines of the us.kmf file as follows:
KEY59 = 0xff6a, 0xff6a ; (Help,Help) you will emulate the "Help" (F1), "Copy" ("Down") and "Paste" ("Up") functions of the SUN keyboard. Another example of keyboard mappingSuppose that you use the us.kmf file and you want some keys of your keyboard to map to the SUN one. You can find the following lines in the us.kmf file:
KEY59 = 0xffbe, 0xffbe ; (XK_F1,XK_F1) If you change them to:
KEY59 = 0xffc8, 0xffc8, 0xffbe ; (XK_F11,XK_F11,XK_F1) then the following keys of your keyboard will map to keys of the SUN keyboard:
F1 => F11/Stop To get codes of F1 - F10 keys, you should press them together with the Alt-Gr key. The COMPOSERS_XKK SectionIn many European languages (especially in France, Belgium and Holland), users need to enter some special characters by combining a Diacritic (or composer) character and a normal letter. For example, the user enters first the '^' sign and then the 'a' character, then this should result in the 'b' keysym. The [KEYS] section does not determine composer characters. The Composers are only defined in the [COMPOSERS_XKK] section. In the [COMPOSERS_XKK] section, each composer statement associates a set of key_ number map pairings with a keysym value. Synopsis of the composer statement is: COMPxx = key_number > key_number[S] [, key_number > key_number[S] ... ] In the composer entry, COMP is the entry name and 'xx' is a decimal keysym value for a composer key (in the range of character codes). The '>' sign defines single code mapping (from the left to the right), while a comma separates possible map pairings. The 'S' character, if exists, allows both cases for a key_number mapping pair, otherwise lower case only. If for a keysym value 'xx' of a key (say, KEYcc), a composer entry COMPxx exists in the [COMPOSERS_XKK] section (i.e. XServer can find it there), then the 'cc' value will not be sent to the X Client (otherwise, it will). In the composer case, XServer will save the keysym value 'xx' until the user presses the next key. If the next key (say, KEYyy) is in the COMPxx entry (like 'yy > zz' in a pair), then XServer will send the value 'zz' from the pair to the X Client. If 'yy' is not found in the COMPxx entry, then XServer will send the composer's key_number 'cc' and the second key_number 'yy'. Note that the values 'yy' and 'zz' are in the range of character codes. Note that if Composer is pressed twice, then XServer will send the single value 'cc' to the X Client. Example:
[KEYS] In this example, if the user presses (normally) the key 41 which is the circumflex accent (on German keyboard), XServer will check if the keysym value 94 is found in the [COMPOSERS_XKK] section (the COMP94 entry), and if yes, then XServer will wait until the user enters the next character. If the next character is in the COMP94 entry (in our case 30), then XServer will send 162 to the X Client (both cases are allowed). If the second key_number is not found in the COMP94 entry, then XServer will send the composer's key_number (in our case 41) and the second key_number. Two examples of the Scroll_Lock key implementationThe "Scroll_Lock" key is used to minimize the XServer window running in the FullScreen mode (if the Local ScrollLock key check box on the XSettings window is on). But some of keyboards do not have certain keys (e.g., Scroll_Lock). By the example of two files, us_ps.kmf and us_ps2.kmf, two possible solutions are considered below to implement the "Scroll_Lock" key code generation. Note that both the files were produced from our standard us.kmf file. You can compare them to view the changes made. Of course, these are only EXAMPLES. The similar changes (of KEY60) may be made with ANY existing keyboard key.
Available Keyboard Mapping Files
|
WinaXe Plus |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
© LabF. All rights reserved. Privacy policy e-mail us at: sales@labf.com | ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ![]() ![]() ![]() ![]() ![]() |