3
This release of rdesktop uses a new, portable keyboard mapping
4
implementation. It should hopefully work on all X11 systems. This new
5
implementation only looks at X11 keysyms: Not on (nonportable)
6
keycodes or modifier status. This means that rdesktop will obey your
7
local keyboard configuration. For example, if you have swapped
8
CapsLock and Control, rdesktop will use this mapping.
10
XKB is currently not used. It seems like a good idea to me, but since
11
some X servers (like Xvnc) does not support XKB, we still need to use
12
the plain old interface as well, at least.
14
There are still some small problems.
16
* CapsLock: CapsLock changes are never sent to the RDP
17
server. rdesktop does not know which keys that are modified by
18
CapsLock and which are not. So, the CapsLock indicator in Wordpad
19
etc will always be off.
21
Composing/Multi_key is supported. For more information, see:
23
MIT: $SRC/xc/nls/X11/locale/Compose/iso8859-1
24
XFree86: /usr/X11R6/lib/X11/locale/*/Compose
25
Solaris' Openwin: /usr/openwin/include/X11/Suncompose.h
26
/usr/openwin/lib/locale/*/Compose
32
The names of the keymaps follows RFC1766.
34
(You can find a translation from Windows keyboard layout numbers to
35
keymap names by looking at
36
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\RFC1766 in the
40
Contents of keymap files
41
========================
42
The keymaps are line based. There are four different types of lines:
46
include <another-map-file>
53
Map-lines specifies how the remote RDP server should interpret the
59
<keysym-name> <scancode> [flags..]
61
The scancode can be found in scancodes.h. Note: The scancode value for
62
extended keys can be calculated by OR:ing with 0x80. Example: The
63
Delete key have the scancode sequence 0xe0, 0x52. You can get the
64
scancode value to put into the map file by running:
66
python -c "print hex(0x80 | 0x52)"
68
If flags are "altgr", "shift", the scancode sent for this
69
keysym will be prefix with AltGr, or Shift.
71
If flags include "addupper", an translation for this keysyms uppercase
72
name will as well, in addition to the non-uppercase name. Example:
76
...will add an translation for "X" automatically, just like if you
81
If flags include "localstate", the modifier to send will be determined
82
by the local modifier state.
84
If flags is "inhibit", nothing will be sent to the server.
89
If any line starts with the keyword "enable_compose", rdesktop will
90
enable local Compose/Multi_key handling. Enabling this will often make
91
it impossible to compose characters with dead keys (on the remote
92
side). This is because when local compose support is enabled, dead
93
keys will not be sent to the remote side.
96
Suggested X11 keysym mapping on PCs
97
===================================
98
Unfortunately, there is no standard for which keysyms a given key
99
should generate. If you have a PC-keyboard with Windows keys, I suggest this mapping:
102
CtrlLeft WinLeft AltLeft Space AltGr WinRight Menu CtrlRight
104
...should generate keysyms:
105
Control_L Hyper_L Alt_L space Mode_switch Hyper_R Menu Control_R
108
Shift-Alt should produce Meta_L
109
Shift-AltGr should produce Multi_Key.
111
Use a modifier-map like this:
113
shift Shift_L (0x32), Shift_R (0x3e)
114
lock Caps_Lock (0x25)
115
control Control_L (0x42), Control_R (0x6d)
118
mod3 Mode_switch (0x71)
119
mod4 Hyper_L (0x73), Hyper_R (0x74)
120
mod5 Scroll_Lock (0x4e)
123
Updating / writing keymap files
124
===============================
125
When writing new or updating keymap files, please use comments and
126
blanks, to increase readability. The "sv" keymap is a good template.
128
When you need to add a translation to a keymap file, do:
130
1. Get the "key number" for this key, by looking at keynums.png.
132
2. Take a look at scancodes.h, and look for
133
SCANCODE_KEY_<my-key-number>. The scancode value is at the end of
134
the line. If the line contains (SCANCODE_EXTENDED | 0xsomething),
135
then you should OR 0x80 to this value. For example, you can do:
137
python -c "print hex(0x80 | 0xsomething)"
139
3. Put the scancode (from step 2) and keysym name (found in the
140
error message) into the keymap file.
146
* The combination Ctrl-Alt-Enter toggles between fullscreen and
149
* Meta, Hyper and Super are treated as windows keys. RDP4 does not
150
support the windows keys though, so if you are running RDP4, these
151
keys will translate to Ctrl-Esc.
156
http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html