diff options
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch')
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch | 515 |
1 files changed, 0 insertions, 515 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch b/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch deleted file mode 100644 index 2dc22bf50e..0000000000 --- a/meta/recipes-graphics/xorg-xserver/xserver-kdrive-1.3.0.0/kdrive-evdev.patch +++ /dev/null | |||
@@ -1,515 +0,0 @@ | |||
1 | # Kdrive evdev support patch, posted by Ander Conselvan de Oliveira at | ||
2 | # http://lists.freedesktop.org/archives/xorg/2005-December/011635.html | ||
3 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/linux/evdev.c xserver/hw/kdrive/linux/evdev.c | ||
4 | --- xserver.original/hw/kdrive/linux/evdev.c 2005-12-16 10:36:05.000000000 -0200 | ||
5 | +++ xserver/hw/kdrive/linux/evdev.c 2005-12-16 10:40:51.077410192 -0200 | ||
6 | @@ -31,9 +31,11 @@ | ||
7 | #include <X11/X.h> | ||
8 | #include <X11/Xproto.h> | ||
9 | #include <X11/Xpoll.h> | ||
10 | +#include <X11/keysym.h> | ||
11 | #include "inputstr.h" | ||
12 | #include "scrnintstr.h" | ||
13 | #include "kdrive.h" | ||
14 | +#include "kkeymap.h" | ||
15 | |||
16 | #define NUM_EVENTS 128 | ||
17 | #define ABS_UNSET -65535 | ||
18 | @@ -105,9 +107,10 @@ | ||
19 | { | ||
20 | KdMouseInfo *mi = closure; | ||
21 | Kevdev *ke = mi->driver; | ||
22 | - int i; | ||
23 | + int i, j; | ||
24 | struct input_event events[NUM_EVENTS]; | ||
25 | int n; | ||
26 | + int flags; | ||
27 | |||
28 | n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event)); | ||
29 | if (n <= 0) | ||
30 | @@ -115,22 +118,64 @@ | ||
31 | n /= sizeof (struct input_event); | ||
32 | for (i = 0; i < n; i++) | ||
33 | { | ||
34 | + flags = KD_MOUSE_DELTA | kdMouseInfo->buttonState; | ||
35 | switch (events[i].type) { | ||
36 | case EV_SYN: | ||
37 | break; | ||
38 | case EV_KEY: | ||
39 | - EvdevMotion (mi); | ||
40 | - ASSIGNBIT(ke->key,events[i].code, events[i].value); | ||
41 | - if (events[i].code < 0x100) | ||
42 | - ErrorF ("key %d %d\n", events[i].code, events[i].value); | ||
43 | - else | ||
44 | - ErrorF ("key 0x%x %d\n", events[i].code, events[i].value); | ||
45 | + if (events[i].code >= BTN_MOUSE && events[i].code < BTN_JOYSTICK) { | ||
46 | + switch (events[i].code) { | ||
47 | + case BTN_LEFT: | ||
48 | + if (events[i].value == 1) | ||
49 | + flags |= KD_BUTTON_1; | ||
50 | + else | ||
51 | + flags &= ~KD_BUTTON_1; | ||
52 | + break; | ||
53 | + case BTN_MIDDLE: | ||
54 | + if (events[i].value == 1) | ||
55 | + flags |= KD_BUTTON_2; | ||
56 | + else | ||
57 | + flags &= ~KD_BUTTON_2; | ||
58 | + break; | ||
59 | + case BTN_RIGHT: | ||
60 | + if (events[i].value == 1) | ||
61 | + flags |= KD_BUTTON_3; | ||
62 | + else | ||
63 | + flags &= ~KD_BUTTON_3; | ||
64 | + break; | ||
65 | + default: | ||
66 | + /* Unknow button */ | ||
67 | + break; | ||
68 | + } | ||
69 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
70 | + } | ||
71 | break; | ||
72 | case EV_REL: | ||
73 | - ke->rel[events[i].code] += events[i].value; | ||
74 | + if (events[i].code == REL_X) { | ||
75 | + KdEnqueueMouseEvent (kdMouseInfo, flags, events[i].value, 0); | ||
76 | + } | ||
77 | + else if (events[i].code == REL_Y) { | ||
78 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, events[i].value); | ||
79 | + } | ||
80 | + else if (events[i].code == REL_WHEEL) { | ||
81 | + for (j = 0; j < abs (events[i].value); j++) { | ||
82 | + if (events[i].value > 0) | ||
83 | + flags |= KD_BUTTON_4; | ||
84 | + else | ||
85 | + flags |= KD_BUTTON_5; | ||
86 | + | ||
87 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
88 | + | ||
89 | + if (events[i].value > 0) | ||
90 | + flags &= ~KD_BUTTON_4; | ||
91 | + else | ||
92 | + flags &= ~KD_BUTTON_5; | ||
93 | + | ||
94 | + KdEnqueueMouseEvent (kdMouseInfo, flags, 0, 0); | ||
95 | + } /* events[i].code == REL_WHEEL */ | ||
96 | + } | ||
97 | break; | ||
98 | case EV_ABS: | ||
99 | - ke->abs[events[i].code] = events[i].value; | ||
100 | break; | ||
101 | } | ||
102 | } | ||
103 | @@ -173,6 +218,12 @@ | ||
104 | fd = open (kdefaultEvdev[i], 2); | ||
105 | if (fd >= 0) | ||
106 | { | ||
107 | + if (ioctl (fd, EVIOCGRAB, 1) < 0) | ||
108 | + { | ||
109 | + close (fd); | ||
110 | + continue; | ||
111 | + } | ||
112 | + | ||
113 | mi->name = KdSaveString (kdefaultEvdev[i]); | ||
114 | break; | ||
115 | } | ||
116 | @@ -287,7 +338,319 @@ | ||
117 | EvdevFini, | ||
118 | }; | ||
119 | |||
120 | -#if 0 | ||
121 | +/* Keyboard */ | ||
122 | + | ||
123 | +int kbd_fd = -1; | ||
124 | +int EvdevInputType = 0; | ||
125 | + | ||
126 | +KeySym evdevKeymap[(194 - 1 + 1) * 2] = { | ||
127 | +/* These are directly mapped from DOS scanset 0 */ | ||
128 | +/* 1 8 */ XK_Escape, NoSymbol, | ||
129 | +/* 2 9 */ XK_1, XK_exclam, | ||
130 | +/* 3 10 */ XK_2, XK_at, | ||
131 | +/* 4 11 */ XK_3, XK_numbersign, | ||
132 | +/* 5 12 */ XK_4, XK_dollar, | ||
133 | +/* 6 13 */ XK_5, XK_percent, | ||
134 | +/* 7 14 */ XK_6, XK_asciicircum, | ||
135 | +/* 8 15 */ XK_7, XK_ampersand, | ||
136 | +/* 9 16 */ XK_8, XK_asterisk, | ||
137 | +/* 10 17 */ XK_9, XK_parenleft, | ||
138 | +/* 11 18 */ XK_0, XK_parenright, | ||
139 | +/* 12 19 */ XK_minus, XK_underscore, | ||
140 | +/* 13 20 */ XK_equal, XK_plus, | ||
141 | +/* 14 21 */ XK_BackSpace, NoSymbol, | ||
142 | +/* 15 22 */ XK_Tab, NoSymbol, | ||
143 | +/* 16 23 */ XK_Q, NoSymbol, | ||
144 | +/* 17 24 */ XK_W, NoSymbol, | ||
145 | +/* 18 25 */ XK_E, NoSymbol, | ||
146 | +/* 19 26 */ XK_R, NoSymbol, | ||
147 | +/* 20 27 */ XK_T, NoSymbol, | ||
148 | +/* 21 28 */ XK_Y, NoSymbol, | ||
149 | +/* 22 29 */ XK_U, NoSymbol, | ||
150 | +/* 23 30 */ XK_I, NoSymbol, | ||
151 | +/* 24 31 */ XK_O, NoSymbol, | ||
152 | +/* 25 32 */ XK_P, NoSymbol, | ||
153 | +/* 26 33 */ XK_bracketleft, XK_braceleft, | ||
154 | +/* 27 34 */ XK_bracketright, XK_braceright, | ||
155 | +/* 28 35 */ XK_Return, NoSymbol, | ||
156 | +/* 29 36 */ XK_Control_L, NoSymbol, | ||
157 | +/* 30 37 */ XK_A, NoSymbol, | ||
158 | +/* 31 38 */ XK_S, NoSymbol, | ||
159 | +/* 32 39 */ XK_D, NoSymbol, | ||
160 | +/* 33 40 */ XK_F, NoSymbol, | ||
161 | +/* 34 41 */ XK_G, NoSymbol, | ||
162 | +/* 35 42 */ XK_H, NoSymbol, | ||
163 | +/* 36 43 */ XK_J, NoSymbol, | ||
164 | +/* 37 44 */ XK_K, NoSymbol, | ||
165 | +/* 38 45 */ XK_L, NoSymbol, | ||
166 | +/* 39 46 */ XK_semicolon, XK_colon, | ||
167 | +/* 40 47 */ XK_apostrophe, XK_quotedbl, | ||
168 | +/* 41 48 */ XK_grave, XK_asciitilde, | ||
169 | +/* 42 49 */ XK_Shift_L, NoSymbol, | ||
170 | +/* 43 50 */ XK_backslash, XK_bar, | ||
171 | +/* 44 51 */ XK_Z, NoSymbol, | ||
172 | +/* 45 52 */ XK_X, NoSymbol, | ||
173 | +/* 46 53 */ XK_C, NoSymbol, | ||
174 | +/* 47 54 */ XK_V, NoSymbol, | ||
175 | +/* 48 55 */ XK_B, NoSymbol, | ||
176 | +/* 49 56 */ XK_N, NoSymbol, | ||
177 | +/* 50 57 */ XK_M, NoSymbol, | ||
178 | +/* 51 58 */ XK_comma, XK_less, | ||
179 | +/* 52 59 */ XK_period, XK_greater, | ||
180 | +/* 53 60 */ XK_slash, XK_question, | ||
181 | +/* 54 61 */ XK_Shift_R, NoSymbol, | ||
182 | +/* 55 62 */ XK_KP_Multiply, NoSymbol, | ||
183 | +/* 56 63 */ XK_Alt_L, XK_Meta_L, | ||
184 | +/* 57 64 */ XK_space, NoSymbol, | ||
185 | +/* 58 65 */ XK_Caps_Lock, NoSymbol, | ||
186 | +/* 59 66 */ XK_F1, NoSymbol, | ||
187 | +/* 60 67 */ XK_F2, NoSymbol, | ||
188 | +/* 61 68 */ XK_F3, NoSymbol, | ||
189 | +/* 62 69 */ XK_F4, NoSymbol, | ||
190 | +/* 63 70 */ XK_F5, NoSymbol, | ||
191 | +/* 64 71 */ XK_F6, NoSymbol, | ||
192 | +/* 65 72 */ XK_F7, NoSymbol, | ||
193 | +/* 66 73 */ XK_F8, NoSymbol, | ||
194 | +/* 67 74 */ XK_F9, NoSymbol, | ||
195 | +/* 68 75 */ XK_F10, NoSymbol, | ||
196 | +/* 69 76 */ XK_Break, XK_Pause, | ||
197 | +/* 70 77 */ XK_Scroll_Lock, NoSymbol, | ||
198 | +/* 71 78 */ XK_KP_Home, XK_KP_7, | ||
199 | +/* 72 79 */ XK_KP_Up, XK_KP_8, | ||
200 | +/* 73 80 */ XK_KP_Page_Up, XK_KP_9, | ||
201 | +/* 74 81 */ XK_KP_Subtract, NoSymbol, | ||
202 | +/* 75 82 */ XK_KP_Left, XK_KP_4, | ||
203 | +/* 76 83 */ XK_KP_5, NoSymbol, | ||
204 | +/* 77 84 */ XK_KP_Right, XK_KP_6, | ||
205 | +/* 78 85 */ XK_KP_Add, NoSymbol, | ||
206 | +/* 79 86 */ XK_KP_End, XK_KP_1, | ||
207 | +/* 80 87 */ XK_KP_Down, XK_KP_2, | ||
208 | +/* 81 88 */ XK_KP_Page_Down, XK_KP_3, | ||
209 | +/* 82 89 */ XK_KP_Insert, XK_KP_0, | ||
210 | +/* 83 90 */ XK_KP_Delete, XK_KP_Decimal, | ||
211 | +/* 84 91 */ NoSymbol, NoSymbol, | ||
212 | +/* 85 92 */ NoSymbol, NoSymbol, | ||
213 | +/* 86 93 */ NoSymbol, NoSymbol, | ||
214 | +/* 87 94 */ XK_F11, NoSymbol, | ||
215 | +/* 88 95 */ XK_F12, NoSymbol, | ||
216 | + | ||
217 | +/* These are remapped from the extended set (using ExtendMap) */ | ||
218 | + | ||
219 | +/* 89 96 */ XK_Control_R, NoSymbol, | ||
220 | +/* 90 97 */ XK_KP_Enter, NoSymbol, | ||
221 | +/* 91 98 */ XK_KP_Divide, NoSymbol, | ||
222 | +/* 92 99 */ XK_Sys_Req, XK_Print, | ||
223 | +/* 93 100 */ XK_Alt_R, XK_Meta_R, | ||
224 | +/* 94 101 */ XK_Num_Lock, NoSymbol, | ||
225 | +/* 95 102 */ XK_Home, NoSymbol, | ||
226 | +/* 96 103 */ XK_Up, NoSymbol, | ||
227 | +/* 97 104 */ XK_Page_Up, NoSymbol, | ||
228 | +/* 98 105 */ XK_Left, NoSymbol, | ||
229 | +/* 99 106 */ XK_Right, NoSymbol, | ||
230 | +/* 100 107 */ XK_End, NoSymbol, | ||
231 | +/* 101 108 */ XK_Down, NoSymbol, | ||
232 | +/* 102 109 */ XK_Page_Down, NoSymbol, | ||
233 | +/* 103 110 */ XK_Insert, NoSymbol, | ||
234 | +/* 104 111 */ XK_Delete, NoSymbol, | ||
235 | +/* 105 112 */ XK_Super_L, NoSymbol, | ||
236 | +/* 106 113 */ XK_Super_R, NoSymbol, | ||
237 | +/* 107 114 */ XK_Menu, NoSymbol, | ||
238 | +/* 108 115 */ NoSymbol, NoSymbol, | ||
239 | +/* 109 116 */ NoSymbol, NoSymbol, | ||
240 | +/* 110 117 */ NoSymbol, NoSymbol, | ||
241 | +/* 111 118 */ NoSymbol, NoSymbol, | ||
242 | +/* 112 119 */ NoSymbol, NoSymbol, | ||
243 | + | ||
244 | +/* 113 120 */ NoSymbol, NoSymbol, | ||
245 | +/* 114 121 */ NoSymbol, NoSymbol, | ||
246 | +/* 115 122 */ NoSymbol, NoSymbol, | ||
247 | +/* 116 123 */ NoSymbol, NoSymbol, | ||
248 | +/* 117 124 */ NoSymbol, NoSymbol, | ||
249 | +/* 118 125 */ NoSymbol, NoSymbol, | ||
250 | +/* 119 126 */ NoSymbol, NoSymbol, | ||
251 | +/* 120 127 */ NoSymbol, NoSymbol, | ||
252 | +/* 121 128 */ NoSymbol, NoSymbol, | ||
253 | +/* 122 129 */ NoSymbol, NoSymbol, | ||
254 | +/* 123 130 */ NoSymbol, NoSymbol, | ||
255 | +/* 124 131 */ NoSymbol, NoSymbol, | ||
256 | +/* 125 132 */ NoSymbol, NoSymbol, | ||
257 | +/* 126 133 */ NoSymbol, NoSymbol, | ||
258 | +/* 127 134 */ NoSymbol, NoSymbol, | ||
259 | +/* 128 135 */ NoSymbol, NoSymbol, | ||
260 | +/* 129 136 */ NoSymbol, NoSymbol, | ||
261 | +/* 130 137 */ NoSymbol, NoSymbol, | ||
262 | +/* 131 138 */ NoSymbol, NoSymbol, | ||
263 | +/* 132 139 */ NoSymbol, NoSymbol, | ||
264 | +/* 133 140 */ NoSymbol, NoSymbol, | ||
265 | +/* 134 141 */ NoSymbol, NoSymbol, | ||
266 | +/* 135 142 */ NoSymbol, NoSymbol, | ||
267 | +/* 136 143 */ NoSymbol, NoSymbol, | ||
268 | +/* 137 144 */ NoSymbol, NoSymbol, | ||
269 | +/* 138 145 */ NoSymbol, NoSymbol, | ||
270 | +/* 139 146 */ NoSymbol, NoSymbol, | ||
271 | +/* 140 147 */ NoSymbol, NoSymbol, | ||
272 | +/* 141 148 */ NoSymbol, NoSymbol, | ||
273 | +/* 142 149 */ NoSymbol, NoSymbol, | ||
274 | +/* 143 150 */ NoSymbol, NoSymbol, | ||
275 | +/* 144 151 */ NoSymbol, NoSymbol, | ||
276 | +/* 145 152 */ NoSymbol, NoSymbol, | ||
277 | +/* 146 153 */ NoSymbol, NoSymbol, | ||
278 | +/* 147 154 */ NoSymbol, NoSymbol, | ||
279 | +/* 148 155 */ NoSymbol, NoSymbol, | ||
280 | +/* 149 156 */ NoSymbol, NoSymbol, | ||
281 | +/* 150 157 */ NoSymbol, NoSymbol, | ||
282 | +/* 151 158 */ NoSymbol, NoSymbol, | ||
283 | +/* 152 159 */ NoSymbol, NoSymbol, | ||
284 | +/* 153 160 */ NoSymbol, NoSymbol, | ||
285 | +/* 154 161 */ NoSymbol, NoSymbol, | ||
286 | +/* 155 162 */ NoSymbol, NoSymbol, | ||
287 | +/* 156 163 */ NoSymbol, NoSymbol, | ||
288 | +/* 157 164 */ NoSymbol, NoSymbol, | ||
289 | +/* 158 165 */ NoSymbol, NoSymbol, | ||
290 | +/* 159 166 */ NoSymbol, NoSymbol, | ||
291 | +/* 160 167 */ NoSymbol, NoSymbol, | ||
292 | +/* 161 168 */ NoSymbol, NoSymbol, | ||
293 | +/* 162 169 */ NoSymbol, NoSymbol, | ||
294 | +/* 163 170 */ NoSymbol, NoSymbol, | ||
295 | +/* 164 171 */ NoSymbol, NoSymbol, | ||
296 | +/* 165 172 */ NoSymbol, NoSymbol, | ||
297 | +/* 166 173 */ NoSymbol, NoSymbol, | ||
298 | +/* 167 174 */ NoSymbol, NoSymbol, | ||
299 | +/* 168 175 */ NoSymbol, NoSymbol, | ||
300 | +/* 169 176 */ NoSymbol, NoSymbol, | ||
301 | +/* 170 177 */ NoSymbol, NoSymbol, | ||
302 | +/* 171 178 */ NoSymbol, NoSymbol, | ||
303 | +/* 172 179 */ NoSymbol, NoSymbol, | ||
304 | +/* 173 180 */ NoSymbol, NoSymbol, | ||
305 | +/* 174 181 */ NoSymbol, NoSymbol, | ||
306 | +/* 175 182 */ NoSymbol, NoSymbol, | ||
307 | +/* 176 183 */ NoSymbol, NoSymbol, | ||
308 | +/* 177 184 */ NoSymbol, NoSymbol, | ||
309 | +/* 178 185 */ NoSymbol, NoSymbol, | ||
310 | +/* 179 186 */ NoSymbol, NoSymbol, | ||
311 | +/* 180 187 */ NoSymbol, NoSymbol, | ||
312 | +/* 181 188 */ NoSymbol, NoSymbol, | ||
313 | +/* 182 189 */ NoSymbol, NoSymbol, | ||
314 | +/* 183 190 */ NoSymbol, NoSymbol, | ||
315 | +/* 184 191 */ NoSymbol, NoSymbol, | ||
316 | +/* 185 192 */ NoSymbol, NoSymbol, | ||
317 | +/* 186 193 */ NoSymbol, NoSymbol, | ||
318 | +/* 187 194 */ NoSymbol, NoSymbol, | ||
319 | +/* 188 195 */ NoSymbol, NoSymbol, | ||
320 | +/* 189 196 */ NoSymbol, NoSymbol, | ||
321 | +/* 190 197 */ NoSymbol, NoSymbol, | ||
322 | +/* 191 198 */ NoSymbol, NoSymbol, | ||
323 | +/* 192 199 */ NoSymbol, NoSymbol, | ||
324 | +/* 193 200 */ NoSymbol, NoSymbol, | ||
325 | +/* 194 201 */ NoSymbol, NoSymbol, | ||
326 | +}; | ||
327 | + | ||
328 | +static void | ||
329 | +EvdevKbdRead (int fd, void *closure) | ||
330 | +{ | ||
331 | + int i, n; | ||
332 | + struct input_event events[NUM_EVENTS]; | ||
333 | + | ||
334 | + n = read (fd, &events, NUM_EVENTS * sizeof (struct input_event)); | ||
335 | + if (n <= 0) | ||
336 | + return; | ||
337 | + | ||
338 | + n /= sizeof (struct input_event); | ||
339 | + | ||
340 | + for (i = 0; i < n; i++) | ||
341 | + { | ||
342 | + if (events[i].type == EV_KEY) | ||
343 | + KdEnqueueKeyboardEvent (events[i].code, !events[i].value); | ||
344 | + } | ||
345 | +} | ||
346 | + | ||
347 | +static void | ||
348 | +EvdevKbdLoad (void) | ||
349 | +{ | ||
350 | + kdMinScanCode = 0; | ||
351 | + kdMaxScanCode = 193; | ||
352 | + kdKeymapWidth = 2; | ||
353 | + memcpy (kdKeymap, evdevKeymap, sizeof (evdevKeymap)); | ||
354 | +} | ||
355 | + | ||
356 | +static int | ||
357 | +EvdevKbdInit (void) | ||
358 | +{ | ||
359 | + int fd, i; | ||
360 | + | ||
361 | + if (!EvdevInputType) | ||
362 | + EvdevInputType = KdAllocInputType (); | ||
363 | + | ||
364 | + if (!kdKeyboard) | ||
365 | + { | ||
366 | + for (i = 0; i < NUM_DEFAULT_EVDEV; i++) | ||
367 | + { | ||
368 | + fd = open (kdefaultEvdev[i], 2); | ||
369 | + if (fd >= 0) | ||
370 | + { | ||
371 | + kdKeyboard = KdSaveString (kdefaultEvdev[i]); | ||
372 | + break; | ||
373 | + } | ||
374 | + } | ||
375 | + } | ||
376 | + else | ||
377 | + { | ||
378 | + fd = open (kdKeyboard, O_RDWR); | ||
379 | + if (fd < 0) | ||
380 | + return FALSE; | ||
381 | + } | ||
382 | + | ||
383 | + if (ioctl (fd, EVIOCGRAB, 1) < 0) | ||
384 | + { | ||
385 | + close (fd); | ||
386 | + return FALSE; | ||
387 | + } | ||
388 | + | ||
389 | + if (!KdRegisterFd (EvdevInputType, fd, EvdevKbdRead, NULL)) | ||
390 | + return FALSE; | ||
391 | + | ||
392 | + kbd_fd = fd; | ||
393 | + return TRUE; | ||
394 | +} | ||
395 | + | ||
396 | +static void | ||
397 | +EvdevKbdFini (void) | ||
398 | +{ | ||
399 | +} | ||
400 | + | ||
401 | +static void | ||
402 | +EvdevKbdLeds (int leds) | ||
403 | +{ | ||
404 | + struct input_event event; | ||
405 | + | ||
406 | + memset(&event, 0, sizeof(event)); | ||
407 | + | ||
408 | + event.type = EV_LED; | ||
409 | + event.code = LED_CAPSL; | ||
410 | + event.value = leds & (1 << 0) ? 1 : 0; | ||
411 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
412 | + | ||
413 | + event.type = EV_LED; | ||
414 | + event.code = LED_NUML; | ||
415 | + event.value = leds & (1 << 1) ? 1 : 0; | ||
416 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
417 | + | ||
418 | + event.type = EV_LED; | ||
419 | + event.code = LED_SCROLLL; | ||
420 | + event.value = leds & (1 << 2) ? 1 : 0; | ||
421 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
422 | + | ||
423 | + event.type = EV_LED; | ||
424 | + event.code = LED_COMPOSE; | ||
425 | + event.value = leds & (1 << 3) ? 1 : 0; | ||
426 | + write(kbd_fd, (char *) &event, sizeof(event)); | ||
427 | +} | ||
428 | + | ||
429 | +static void | ||
430 | +EvdevKbdBell (int volume, int frequency, int duration) | ||
431 | +{ | ||
432 | +} | ||
433 | + | ||
434 | KdKeyboardFuncs LinuxEvdevKeyboardFuncs = { | ||
435 | EvdevKbdLoad, | ||
436 | EvdevKbdInit, | ||
437 | @@ -296,4 +659,4 @@ | ||
438 | EvdevKbdFini, | ||
439 | 0, | ||
440 | }; | ||
441 | -#endif | ||
442 | + | ||
443 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.c xserver/hw/kdrive/src/kdrive.c | ||
444 | --- xserver.original/hw/kdrive/src/kdrive.c 2005-12-16 10:36:07.000000000 -0200 | ||
445 | +++ xserver/hw/kdrive/src/kdrive.c 2005-12-16 10:37:09.000000000 -0200 | ||
446 | @@ -73,6 +73,7 @@ | ||
447 | Bool kdEnabled; | ||
448 | int kdSubpixelOrder; | ||
449 | int kdVirtualTerminal = -1; | ||
450 | +char *kdKeyboard = 0; | ||
451 | Bool kdSwitchPending; | ||
452 | char *kdSwitchCmd; | ||
453 | DDXPointRec kdOrigin; | ||
454 | @@ -795,6 +796,14 @@ | ||
455 | UseMsg (); | ||
456 | return 2; | ||
457 | } | ||
458 | + if (!strcmp (argv[i], "-keyboard")) | ||
459 | + { | ||
460 | + if ((i+1) < argc) | ||
461 | + kdKeyboard = argv[i+1]; | ||
462 | + else | ||
463 | + UseMsg (); | ||
464 | + return 2; | ||
465 | + } | ||
466 | if (!strcmp (argv[i], "-rgba")) | ||
467 | { | ||
468 | if ((i+1) < argc) | ||
469 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kdrive.h xserver/hw/kdrive/src/kdrive.h | ||
470 | --- xserver.original/hw/kdrive/src/kdrive.h 2005-12-16 10:36:07.000000000 -0200 | ||
471 | +++ xserver/hw/kdrive/src/kdrive.h 2005-12-16 10:37:09.000000000 -0200 | ||
472 | @@ -416,6 +416,7 @@ | ||
473 | extern Bool kdDisableZaphod; | ||
474 | extern Bool kdDontZap; | ||
475 | extern int kdVirtualTerminal; | ||
476 | +extern char *kdKeyboard; | ||
477 | extern char *kdSwitchCmd; | ||
478 | extern KdOsFuncs *kdOsFuncs; | ||
479 | |||
480 | @@ -769,7 +770,7 @@ | ||
481 | ProcessInputEvents (void); | ||
482 | |||
483 | extern KdMouseFuncs LinuxMouseFuncs; | ||
484 | -extern KdMouseFuncs LinuxEvdevFuncs; | ||
485 | +extern KdMouseFuncs LinuxEvdevMouseFuncs; | ||
486 | extern KdMouseFuncs Ps2MouseFuncs; | ||
487 | extern KdMouseFuncs BusMouseFuncs; | ||
488 | extern KdMouseFuncs MsMouseFuncs; | ||
489 | @@ -777,6 +778,7 @@ | ||
490 | extern KdMouseFuncs TsFuncs; | ||
491 | #endif | ||
492 | extern KdKeyboardFuncs LinuxKeyboardFuncs; | ||
493 | +extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs; | ||
494 | extern KdOsFuncs LinuxFuncs; | ||
495 | |||
496 | extern KdMouseFuncs VxWorksMouseFuncs; | ||
497 | diff -u -r --exclude=CVS --exclude=Makefile --exclude='*.o' --exclude=ephyr --exclude='*.Po' xserver.original/hw/kdrive/src/kinput.c xserver/hw/kdrive/src/kinput.c | ||
498 | --- xserver.original/hw/kdrive/src/kinput.c 2005-12-16 10:36:07.000000000 -0200 | ||
499 | +++ xserver/hw/kdrive/src/kinput.c 2005-12-16 10:37:09.000000000 -0200 | ||
500 | @@ -1300,6 +1300,7 @@ | ||
501 | xE.u.u.type = KeyPress; | ||
502 | xE.u.u.detail = key_code; | ||
503 | |||
504 | +#ifndef XKB | ||
505 | switch (KEYCOL1(key_code)) | ||
506 | { | ||
507 | case XK_Num_Lock: | ||
508 | @@ -1313,6 +1314,7 @@ | ||
509 | else | ||
510 | xE.u.u.type = KeyPress; | ||
511 | } | ||
512 | +#endif | ||
513 | |||
514 | /* | ||
515 | * Check pressed keys which are already down | ||