Administration Features and Functions > Defining Custom Key Mappings
  
Defining Custom Key Mappings
A system administrator can define custom key mappings for use in the QAD .NET UI’s terminal mode.
Use an XML file to define the key mappings. Name the file keymapping.xml and place it in the directory defined by the HomeServer configuration value, which is defined at installation time. (The HomeServer configuration value is typically TomcatInstallDir/webapps/qadhome.) The system identifies the keymapping.xml file through the <TerminalKeyMapUrl> element in the client session configuration file. If the element is not in the file by default, you must add it.
For example, in the client session configuration file, you can add a <TerminalKeyMapUrl> element and set it to ${HomeServer}/keymap.xml as follows:
<TerminalKeyMapUrl>${HomeServer}/keymapping.xml</TerminalKeyMapUrl>
The keymapping.xml file includes a <KeyMapping> element that includes one or more <KeyMap> elements, whose key and value attributes define a key mapping.
Note: You can change the name and location of the XML file provided you also change the value of the <TerminalKeyMapUrl> setting accordingly.
In this example, the keymapping.xml file directs the number pad keys "/" and "*" to act as F1 and F4 keys in terminal mode:
<KeyMapping>
<KeyMap key="/" value="\u001bOP" />
<KeyMap key="*" value="\u001bOS" />
</KeyMapping>
For a listing of possible key settings, see Microsoft Developer Network’s  .NET Framework Class Library for Key Enumeration (http://msdn2.microsoft.com/en-us/library/system.windows.forms.keys(vs.71).aspx).
The following table lists the possible value settings:
 
Terminal Mode Key
Value
F1
"\u001bOP"
F2
"\u001bOQ"
F3
"\u001bOR"
F4
"\u001bOS"
F5
"\u0004"
F6
"\u001b[17~"
F7
"\u001b[18~"
F8
"\u001b[19~"
F9
"\u001b[20~"
F10
"\u001b[21~"
F11
"\u0002"
F12
"\u001b[24~"
F13
"\u001b[25~"
F14
"\u001b[26~"
F15
"\u001b[28~"
F16
"\u001b[29~"
F17
"\u001b[31~"
F18
"\u001b[32~"
F19
"\u001b[33~"
F20
"\u001b[34~"
0 (keypad)
"0"
1 (keypad)
"1"
2 (keypad)
"2"
3 (keypad)
"3"
4 (keypad)
"4"
5 (keypad)
"5"
6 (keypad)
"6"
7 (keypad)
"7"
8 (keypad)
"8"
9 (keypad)
"9"
/ (keypad)
"/"
* (keypad)
"*"
- (keypad)
"-"
+ (keypad)
"+"
Tab
"\u0009"
Shift Tab
"\u001bOP\u0009"
Page Up
"\u001b[5~"
Page Down
"\u001b[6~"