/[rdesktop]/sourceforge.net/trunk/rdesktop/doc/keymapping.txt
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/doc/keymapping.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 455 - (hide annotations)
Sun Aug 31 20:00:22 2003 UTC (20 years, 9 months ago) by astrand
File MIME type: text/plain
File size: 5242 byte(s)
Better english, or something like that.

1 astrand 104 Keyboard mapping
2     ================
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.
9    
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.
13    
14     There are still some small problems.
15    
16     * NumLock handling: NumLock is switched off when typing a non-numlock
17     key. rdesktop does not know which keys are NumLock-dependent and
18     not. When you type a numlock-dependent key again, NumLock is
19     switched on on the server again. The only problem really is that the
20     NumLock indicator in Wordpad etc switches on and off when you type.
21    
22     * CapsLock: CapsLock changes are never sent to the RDP server. This is
23     a problem of the same type as NumLock: rdesktop does not know which
24     keys that are modified by CapsLock and which are not. So, the
25     CapsLock indicator in Wordpad etc will always be off.
26    
27     Composing/Multi_key is supported. For more information, see:
28    
29     MIT: $SRC/xc/nls/X11/locale/Compose/iso8859-1
30     XFree86: /usr/X11R6/lib/X11/locale/*/Compose
31     Solaris' Openwin: /usr/openwin/include/X11/Suncompose.h
32     /usr/openwin/lib/locale/*/Compose
33     Irix6: compose(5)
34    
35    
36 astrand 167 Keymap files
37 astrand 272 ============
38     The names of the keymaps follows RFC1766.
39 astrand 167
40     (You can find a translation from Windows keyboard layout numbers to
41     keymap names by looking at
42     HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MIME\Database\RFC1766 in the
43     registry.)
44    
45    
46     Contents of keymap files
47     ========================
48 astrand 166 The keymaps are line based. There are four different types of lines:
49 astrand 104
50     1) include-lines
51     Syntax:
52     include <another-map-file>
53    
54    
55     2) map-lines
56     Syntax:
57     map <hex-number>
58    
59     Map-lines specifies how the remote RDP server should interpret the
60     sent scancodes.
61    
62    
63     3) Translation-lines
64     Syntax:
65     <keysym-name> <scancode> [flags..]
66    
67     The scancode can be found in scancodes.h. Note: The scancode value for
68     extended keys can be calculated by OR:ing with 0x80. Example: The
69     Delete key have the scancode sequence 0xe0, 0x52. You can get the
70     scancode value to put into the map file by running:
71    
72     python -c "print hex(0x80 | 0x52)"
73    
74     If flags are "altgr", "shift", "numlock", the scancode sent for this
75     keysym will be prefix with AltGr, Shift or Numlock.
76    
77     If flags include "addupper", an translation for this keysyms uppercase
78     name will as well, in addition to the non-uppercase name. Example:
79    
80     x 2d addupper
81    
82     ...will add an translation for "X" automatically, just like if you
83     would specify:
84    
85     X 2d shift
86    
87     If flags include "localstate", the modifier to send will be determined
88     by the local modifier state.
89    
90 astrand 116 If flags is "inhibit", nothing will be sent to the server.
91 astrand 104
92 astrand 116
93 astrand 104 4) enable_compose
94    
95     If any line starts with the keyword "enable_compose", rdesktop will
96     enable local Compose/Multi_key handling. Enabling this will often make
97     it impossible to compose characters with dead keys (on the remote
98     side). This is because when local compose support is enabled, dead
99     keys will not be sent to the remote side.
100    
101    
102     Suggested X11 keysym mapping on PCs
103     ===================================
104     Unfortunately, there is no standard for which keysyms a given key
105     should generate. If you have a PC-keyboard with Windows keys, I suggest this mapping:
106    
107     Keyboard keys:
108     CtrlLeft WinLeft AltLeft Space AltGr WinRight Menu CtrlRight
109    
110     ...should generate keysyms:
111     Control_L Hyper_L Alt_L space Mode_switch Hyper_R Menu Control_R
112    
113     Additionally:
114     Shift-Alt should produce Meta_L
115     Shift-AltGr should produce Multi_Key.
116    
117     Use a modifier-map like this:
118    
119     shift Shift_L (0x32), Shift_R (0x3e)
120     lock Caps_Lock (0x25)
121     control Control_L (0x42), Control_R (0x6d)
122     mod1 Alt_L (0x40)
123     mod2 Num_Lock (0x4d)
124     mod3 Mode_switch (0x71)
125     mod4 Hyper_L (0x73), Hyper_R (0x74)
126     mod5 Scroll_Lock (0x4e)
127 astrand 272
128    
129     Updating / writing keymap files
130     ===============================
131     When writing new or updating keymap files, please use comments and
132     blanks, to increase readability. The "sv" keymap is a good template.
133    
134     When you need to add a translation to a keymap file, do:
135    
136     1. Get the "key number" for this key, by looking at keynums.png.
137    
138     2. Take a look at scancodes.h, and look for
139     SCANCODE_KEY_<my-key-number>. The scancode value is at the end of
140     the line. If the line contains (SCANCODE_EXTENDED | 0xsomething),
141     then you should OR 0x80 to this value. For example, you can do:
142    
143     python -c "print hex(0x80 | 0xsomething)"
144    
145     3. Put the scancode (from step 2) and keysym name (found in the
146     error message) into the keymap file.
147 astrand 434
148    
149 astrand 454 Special keys
150     ============
151    
152     * The combination Ctrl-Alt-Enter toggles between fullscreen and
153     non-fullscreen mode.
154    
155 astrand 455 * Meta, Hyper and Super are treated as windows keys. RDP4 does not
156 astrand 454 support the windows keys though, so if you are running RDP4, these
157     keys will translate to Ctrl-Esc.
158    
159    
160 astrand 434 Links
161     =====
162     http://www.win.tue.nl/~aeb/linux/kbd/scancodes.html

  ViewVC Help
Powered by ViewVC 1.1.26