my .xmodmap contents:
keycode 115 = Control_L
attached are the output of xmodmap -pk and -pm
--Sudhakar.
On Sun, 16 Jan 2005 sudhakar+xfree86@xxxxxxxxxxxxxxxx wrote:
> Hi all,
>
> [I am newbie to X stuff.]
>
> X version:
> 22:28:46]sudhakar::~ # rpm --query xorg-x11
> xorg-x11-6.7.0-10
> [22:28:50]sudhakar::~ #
>
>
>
> I lost my ctrl-key when I was moving. It is no help with emacs if you do
> not have ctrl key. I am trying to map my "windows" key to left-ctrl key.
> Somehow it does not work. Anyone has experience?
>
>
> keycodes are
> windows button : 115
> ctrl-left : 37
> x : 53
>
> I used xmodmap to map key-115 (windows) to Control_L. But somehow that
> does not work. There is some problem in translation.
>
>
> win-x does not translate to ctrl-x as it should be. I used "xev" to see
> what is happening. can someone help? win returns the same code as ctrl.
> but the next character x is not mapped properly to 0x18. i see 0x78
> (ascci-'x') instead.
>
>
> interesting things from "xev" output:
>
> 115-x:
>
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 109788, (84,-9), root:(1083,514),
> state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
> XKeysymToKeycode returns keycode: 37 <------ not there in ctrl-x
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>
> (this seems fine. just that there is an extra mapping from 115 to 37,
> which is expected)
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 110039, (84,-9), root:(1083,514),
> state 0x0, keycode 53 (keysym 0x78, x), same_screen YES, <---state0x0
> XLookupString gives 1 bytes: (78) "x" <--- output 78.
> XmbLookupString gives 1 bytes: (78) "x"
> XFilterEvent returns: False
>
> output should be 18.. that is the problem
>
>
>
> ctrl-x:
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122194, (84,-9), root:(1083,514),
> state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122487, (84,-9), root:(1083,514),
> state 0x4, keycode 53 (keysym 0x78, x), same_screen YES, <---state0x4
> XLookupString gives 1 bytes: (18) "" <----output 18
> XmbLookupString gives 1 bytes: (18) ""
> XFilterEvent returns: False
>
>
>
> Any ideas?
>
>
> I wanted to download X source and look it. I cannot figure out how to
> extract source from srpm. can someone tell me how?
>
>
> thanks,
> Sudhakar
>
> PS: already wasted about 4 hours on this. :-)
>
> more complete xev output:
>
>
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 109788, (84,-9), root:(1083,514),
> state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
> XKeysymToKeycode returns keycode: 37
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 110039, (84,-9), root:(1083,514),
> state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
> XLookupString gives 1 bytes: (78) "x"
> XmbLookupString gives 1 bytes: (78) "x"
> XFilterEvent returns: False
>
> KeyRelease event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 110112, (84,-9), root:(1083,514),
> state 0x0, keycode 53 (keysym 0x78, x), same_screen YES,
> XLookupString gives 1 bytes: (78) "x"
>
> KeyRelease event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 110193, (84,-9), root:(1083,514),
> state 0x0, keycode 115 (keysym 0xffe3, Control_L), same_screen YES,
> XKeysymToKeycode returns keycode: 37
> XLookupString gives 0 bytes:
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122194, (84,-9), root:(1083,514),
> state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
> XmbLookupString gives 0 bytes:
> XFilterEvent returns: False
>
> KeyPress event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122487, (84,-9), root:(1083,514),
> state 0x4, keycode 53 (keysym 0x78, x), same_screen YES,
> XLookupString gives 1 bytes: (18) ""
> XmbLookupString gives 1 bytes: (18) ""
> XFilterEvent returns: False
>
> KeyRelease event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122560, (84,-9), root:(1083,514),
> state 0x4, keycode 53 (keysym 0x78, x), same_screen YES,
> XLookupString gives 1 bytes: (18) ""
>
> KeyRelease event, serial 28, synthetic NO, window 0x2800001,
> root 0x60, subw 0x0, time 122684, (84,-9), root:(1083,514),
> state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
> XLookupString gives 0 bytes:
>
>
>
>
>
> Sudhakar Govindavajhala Department of Computer Science
> Graduate Student, Princeton University
> Ph : (lab) +1 609 258 1763 (office) +1 609 258 1798
> http://www.cs.princeton.edu/~sudhakar
> _______________________________________________
> XFree86 mailing list
> XFree86@xxxxxxxxxxx
> http://XFree86.Org/mailman/listinfo/xfree86
>
Sudhakar.
Sudhakar Govindavajhala Department of Computer Science
Graduate Student, Princeton University
Ph : (lab) +1 609 258 1763 (office) +1 609 258 1798
http://www.cs.princeton.edu/~sudhakar
[13:37:47]sudhakar::~ $ xmodmap -pk
There are 6 KeySyms per KeyCode; KeyCodes range from 8 to 255.
KeyCode Keysym (Keysym) ...
Value Value (Name) ...
8
9 0xff1b (Escape)
10 0x0031 (1) 0x0021 (exclam)
11 0x0032 (2) 0x0040 (at)
12 0x0033 (3) 0x0023 (numbersign)
13 0x0034 (4) 0x0024 (dollar)
14 0x0035 (5) 0x0025 (percent)
15 0x0036 (6) 0x005e (asciicircum)
16 0x0037 (7) 0x0026 (ampersand)
17 0x0038 (8) 0x002a (asterisk)
18 0x0039 (9) 0x0028 (parenleft)
19 0x0030 (0) 0x0029 (parenright)
20 0x002d (minus) 0x005f (underscore)
21 0x003d (equal) 0x002b (plus)
22 0xff08 (BackSpace) 0xfed5 (Terminate_Server)
23 0xff09 (Tab) 0xfe20 (ISO_Left_Tab)
24 0x0071 (q) 0x0051 (Q)
25 0x0077 (w) 0x0057 (W)
26 0x0065 (e) 0x0045 (E)
27 0x0072 (r) 0x0052 (R)
28 0x0074 (t) 0x0054 (T)
29 0x0079 (y) 0x0059 (Y)
30 0x0075 (u) 0x0055 (U)
31 0x0069 (i) 0x0049 (I)
32 0x006f (o) 0x004f (O)
33 0x0070 (p) 0x0050 (P)
34 0x005b (bracketleft) 0x007b (braceleft)
35 0x005d (bracketright) 0x007d (braceright)
36 0xff0d (Return)
37 0xffe3 (Control_L)
38 0x0061 (a) 0x0041 (A)
39 0x0073 (s) 0x0053 (S)
40 0x0064 (d) 0x0044 (D)
41 0x0066 (f) 0x0046 (F)
42 0x0067 (g) 0x0047 (G)
43 0x0068 (h) 0x0048 (H)
44 0x006a (j) 0x004a (J)
45 0x006b (k) 0x004b (K)
46 0x006c (l) 0x004c (L)
47 0x003b (semicolon) 0x003a (colon)
48 0x0027 (apostrophe) 0x0022 (quotedbl)
49 0x0060 (grave) 0x007e (asciitilde)
50 0xffe1 (Shift_L)
51 0x005c (backslash) 0x007c (bar)
52 0x007a (z) 0x005a (Z)
53 0x0078 (x) 0x0058 (X)
54 0x0063 (c) 0x0043 (C)
55 0x0076 (v) 0x0056 (V)
56 0x0062 (b) 0x0042 (B)
57 0x006e (n) 0x004e (N)
58 0x006d (m) 0x004d (M)
59 0x002c (comma) 0x003c (less)
60 0x002e (period) 0x003e (greater)
61 0x002f (slash) 0x003f (question)
62 0xffe2 (Shift_R)
63 0xffaa (KP_Multiply) 0x1008fe21 (XF86_ClearGrab)
64 0xffe9 (Alt_L) 0xffe7 (Meta_L)
65 0x0020 (space)
66 0xffe5 (Caps_Lock)
67 0xffbe (F1) 0x1008fe01 (XF86_Switch_VT_1)
68 0xffbf (F2) 0x1008fe02 (XF86_Switch_VT_2)
69 0xffc0 (F3) 0x1008fe03 (XF86_Switch_VT_3)
70 0xffc1 (F4) 0x1008fe04 (XF86_Switch_VT_4)
71 0xffc2 (F5) 0x1008fe05 (XF86_Switch_VT_5)
72 0xffc3 (F6) 0x1008fe06 (XF86_Switch_VT_6)
73 0xffc4 (F7) 0x1008fe07 (XF86_Switch_VT_7)
74 0xffc5 (F8) 0x1008fe08 (XF86_Switch_VT_8)
75 0xffc6 (F9) 0x1008fe09 (XF86_Switch_VT_9)
76 0xffc7 (F10) 0x1008fe0a (XF86_Switch_VT_10)
77 0xff7f (Num_Lock) 0xfef9 (Pointer_EnableKeys)
78 0xff14 (Scroll_Lock)
79 0xff95 (KP_Home) 0xffb7 (KP_7)
80 0xff97 (KP_Up) 0xffb8 (KP_8)
81 0xff9a (KP_Prior) 0xffb9 (KP_9)
82 0xffad (KP_Subtract) 0x1008fe23 (XF86_Prev_VMode)
83 0xff96 (KP_Left) 0xffb4 (KP_4)
84 0xff9d (KP_Begin) 0xffb5 (KP_5)
85 0xff98 (KP_Right) 0xffb6 (KP_6)
86 0xffab (KP_Add) 0x1008fe22 (XF86_Next_VMode)
87 0xff9c (KP_End) 0xffb1 (KP_1)
88 0xff99 (KP_Down) 0xffb2 (KP_2)
89 0xff9b (KP_Next) 0xffb3 (KP_3)
90 0xff9e (KP_Insert) 0xffb0 (KP_0)
91 0xff9f (KP_Delete) 0xffae (KP_Decimal)
92
93 0xff7e (Mode_switch)
94 0x003c (less) 0x003e (greater) 0x007c (bar)
0x00a6 (brokenbar) 0x007c (bar) 0x00a6 (brokenbar)
95 0xffc8 (F11) 0x1008fe0b (XF86_Switch_VT_11)
96 0xffc9 (F12) 0x1008fe0c (XF86_Switch_VT_12)
97 0xff50 (Home)
98 0xff52 (Up)
99 0xff55 (Prior)
100 0xff51 (Left)
101
102 0xff53 (Right)
103 0xff57 (End)
104 0xff54 (Down)
105 0xff56 (Next)
106 0xff63 (Insert)
107 0xffff (Delete)
108 0xff8d (KP_Enter)
109 0xffe4 (Control_R)
110 0xff13 (Pause) 0xff6b (Break)
111 0xff61 (Print) 0xff15 (Sys_Req)
112 0xffaf (KP_Divide) 0x1008fe20 (XF86_Ungrab)
113 0xffea (Alt_R) 0xffe8 (Meta_R)
114
115 0xffe3 (Control_L)
116 0xffec (Super_R)
117 0xff67 (Menu)
118
119
120
121
122
123
124 0xfe03 (ISO_Level3_Shift)
125 0xffe3 (Control_L)
126 0xffbd (KP_Equal)
127 0x0000 (NoSymbol) 0xffeb (Super_L)
128 0x0000 (NoSymbol) 0xffed (Hyper_L)
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156 0x0000 (NoSymbol) 0xffe7 (Meta_L)
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
[13:37:54]sudhakar::~ $ xmodmap -pm
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Control_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
[13:37:58]sudhakar::~ $