1 |
Keymap-files |
2 |
============ |
3 |
The keymaps are line based. There are three different types of lines: |
4 |
|
5 |
1) include-lines |
6 |
Syntax: |
7 |
include <another-map-file> |
8 |
|
9 |
|
10 |
2) map-lines |
11 |
Syntax: |
12 |
map <hex-number> |
13 |
|
14 |
Map-lines specifies how the remote RDP server should interpret the |
15 |
sent scancodes. |
16 |
|
17 |
|
18 |
3) Translation-lines |
19 |
Syntax: |
20 |
<keysym-name> <scancode> [flags..] |
21 |
|
22 |
The scancode can be found in scancodes.h. Note: The scancode value for |
23 |
extended keys can be calculated by OR:ing with 0x80. Example: The |
24 |
Delete key have the scancode sequence 0xe0, 0x52. You can get the |
25 |
scancode value to put into the map file by running: |
26 |
|
27 |
python -c "print hex(0x80 | 0x52)" |
28 |
|
29 |
If flags are "altgr", "shift", "numlock", the scancode sent for this |
30 |
keysym will be prefix with AltGr, Shift or Numlock. |
31 |
|
32 |
If flags include "addupper", an translation for this keysyms uppercase |
33 |
name will as well, in addition to the non-uppercase name. Example: |
34 |
|
35 |
x 2d addupper |
36 |
|
37 |
...will add an translation for "X" automatically, just like if you |
38 |
would specify: |
39 |
|
40 |
X 2d shift |
41 |
|
42 |
If flags include "localstate", the modifier to send will be determined |
43 |
by the local modifier state. |
44 |
|
45 |
|
46 |
4) enable_compose |
47 |
|
48 |
If any line starts with the keyword "enable_compose", rdesktop will |
49 |
enable local Compose/Multi_key handling. Enabling this will often make |
50 |
it impossible to compose characters with dead keys (on the remote |
51 |
side). This is because when local compose support is enabled, dead |
52 |
keys will not be sent to the remote side. |
53 |
|
54 |
|
55 |
Suggested X11 keysym mapping on PCs |
56 |
=================================== |
57 |
Unfortunately, there is no standard for which keysyms a given key |
58 |
should generate. If you have a PC-keyboard with Windows keys, I suggest this mapping: |
59 |
|
60 |
Keyboard keys: |
61 |
CtrlLeft WinLeft AltLeft Space AltGr WinRight Menu CtrlRight |
62 |
|
63 |
...should generate keysyms: |
64 |
Control_L Hyper_L Alt_L space Mode_switch Hyper_R Menu Control_R |
65 |
|
66 |
Additionally: |
67 |
Shift-Alt should produce Meta_L |
68 |
Shift-AltGr should produce Multi_Key. |
69 |
|
70 |
Use a modifier-map like this: |
71 |
|
72 |
shift Shift_L (0x32), Shift_R (0x3e) |
73 |
lock Caps_Lock (0x25) |
74 |
control Control_L (0x42), Control_R (0x6d) |
75 |
mod1 Alt_L (0x40) |
76 |
mod2 Num_Lock (0x4d) |
77 |
mod3 Mode_switch (0x71) |
78 |
mod4 Hyper_L (0x73), Hyper_R (0x74) |
79 |
mod5 Scroll_Lock (0x4e) |