]>
Commit | Line | Data |
---|---|---|
7fde521a AM |
1 | diff -urN rdesktop-1.5.0.org/vnc/vnc.c rdesktop-1.5.0/vnc/vnc.c |
2 | --- rdesktop-1.5.0.org/vnc/vnc.c 1970-01-01 01:00:00.000000000 +0100 | |
3 | +++ rdesktop-1.5.0/vnc/vnc.c 2004-10-07 15:00:29.000000000 +0200 | |
4 | @@ -0,0 +1,1376 @@ | |
5 | +/* | |
6 | + rdesktop: A Remote Desktop Protocol client. | |
7 | + User interface services - VNC target | |
8 | + Copyright (C) Matthew Chapman 1999-2000 | |
9 | + Copyright (C) 2000 Tim Edmonds | |
10 | + Copyright (C) 2001 James "Wez" Weatherall | |
11 | + Copyright (C) 2001 Johannes E. Schindelin | |
12 | + | |
13 | + This program is free software; you can redistribute it and/or modify | |
14 | + it under the terms of the GNU General Public License as published by | |
15 | + the Free Software Foundation; either version 2 of the License, or | |
16 | + (at your option) any later version. | |
17 | + | |
18 | + This program is distributed in the hope that it will be useful, | |
19 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | + GNU General Public License for more details. | |
22 | + | |
23 | + You should have received a copy of the GNU General Public License | |
24 | + along with this program; if not, write to the Free Software | |
25 | + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
26 | +*/ | |
27 | + | |
28 | + | |
29 | +#include <stdio.h> | |
30 | +#include <time.h> | |
31 | + | |
32 | +#ifdef WIN32 | |
33 | +#define close closesocket | |
34 | +#define strcasecmp _strcmpi | |
35 | +#else | |
36 | +#include <unistd.h> | |
37 | +#include <sys/time.h> /* timeval */ | |
38 | +#include <sys/socket.h> | |
39 | +#endif | |
40 | + | |
41 | +#include "../rdesktop.h" | |
42 | +#undef VERSION | |
43 | + | |
44 | +#ifdef WIN32 | |
45 | +#define HBITMAP R_HBITMAP | |
46 | +#define HCURSOR R_HCURSOR | |
47 | +#define WORD R_WORD | |
48 | +#endif | |
49 | +#include "vnc.h" | |
50 | +#ifdef WIN32 | |
51 | +#undef HBITMAP | |
52 | +#undef HCURSOR | |
53 | +#undef WORD | |
54 | +#endif | |
55 | + | |
56 | +#include <errno.h> | |
57 | +#include <sys/socket.h> | |
58 | +extern int ListenOnTCPPort(int port); | |
59 | +extern int rfbClientSocket; | |
60 | + | |
61 | +#include <rfb/rfbregion.h> | |
62 | + | |
63 | +#define BITSPERBYTES 8 | |
64 | +#define TOBYTES(bits) ((bits)/BITSPERBYTES) | |
65 | + | |
66 | +extern int g_width; | |
67 | +extern int g_height; | |
68 | +extern int keylayout; | |
69 | +extern BOOL sendmotion; | |
70 | +#ifdef ENABLE_SHADOW | |
71 | +extern int client_counter; | |
72 | +#endif | |
73 | + | |
74 | + | |
75 | +int rfb_port = 5923; | |
76 | +int defer_time = 5; | |
77 | +int rfbClientSocket = 0; | |
78 | +static rfbScreenInfoPtr server = NULL; | |
79 | +static vncBuffer *frameBuffer = NULL; | |
80 | +static uint8_t reverseByte[0x100]; | |
81 | +BOOL g_enable_compose = False; | |
82 | +int g_display = 0; | |
83 | + | |
84 | +/* ignored */ | |
85 | +BOOL owncolmap = False; | |
86 | +BOOL enable_compose = False; | |
87 | + | |
88 | +void | |
89 | +vncHideCursor() | |
90 | +{ | |
91 | + if (server->clientHead) | |
92 | + rfbUndrawCursor(server); | |
93 | +} | |
94 | + | |
95 | +/* -=- mouseLookup | |
96 | + * Table converting mouse button number (0-2) to flag | |
97 | + */ | |
98 | + | |
99 | +int mouseLookup[3] = { | |
100 | + MOUSE_FLAG_BUTTON1, MOUSE_FLAG_BUTTON3, MOUSE_FLAG_BUTTON2 | |
101 | +}; | |
102 | + | |
103 | +int clipX, clipY, clipW, clipH; | |
104 | + | |
105 | +BOOL | |
106 | +vncwinClipRect(int *x, int *y, int *cx, int *cy) | |
107 | +{ | |
108 | + if (*x + *cx > clipX + clipW) | |
109 | + *cx = clipX + clipW - *x; | |
110 | + if (*y + *cy > clipY + clipH) | |
111 | + *cy = clipY + clipH - *y; | |
112 | + if (*x < clipX) | |
113 | + { | |
114 | + *cx -= clipX - *x; | |
115 | + *x = clipX; | |
116 | + } | |
117 | + if (*y < clipY) | |
118 | + { | |
119 | + *cy -= clipY - *y; | |
120 | + *y = clipY; | |
121 | + } | |
122 | + if (*cx < 0 || *cy < 0) | |
123 | + *cx = *cy = 0; | |
124 | + return (*cx > 0 && *cy > 0 && *x < server->width && *y < server->height); | |
125 | +} | |
126 | + | |
127 | +void | |
128 | +xwin_toggle_fullscreen(void) | |
129 | +{ | |
130 | +} | |
131 | + | |
132 | +static int lastbuttons = 0; | |
133 | + | |
134 | +#define FIRST_MODIFIER XK_Shift_L | |
135 | +#define LAST_MODIFIER XK_Hyper_R | |
136 | + | |
137 | +static BOOL keystate[LAST_MODIFIER - FIRST_MODIFIER]; | |
138 | + | |
139 | +void | |
140 | +init_keyboard() | |
141 | +{ | |
142 | + int i; | |
143 | + for (i = 0; i < LAST_MODIFIER - FIRST_MODIFIER; i++) | |
144 | + keystate[i] = 0; | |
145 | + | |
146 | + xkeymap_init(); | |
147 | +} | |
148 | + | |
149 | +BOOL | |
150 | +get_key_state(unsigned int state, uint32 keysym) | |
151 | +{ | |
152 | + if (keysym >= FIRST_MODIFIER && keysym <= LAST_MODIFIER) | |
153 | + return keystate[keysym - FIRST_MODIFIER]; | |
154 | + return 0; | |
155 | +} | |
156 | + | |
157 | +void | |
158 | +vncKey(rfbBool down, rfbKeySym keysym, struct _rfbClientRec *cl) | |
159 | +{ | |
160 | + uint32 ev_time = time(NULL); | |
161 | + key_translation tr = { 0, 0 }; | |
162 | + | |
163 | + if (keysym >= FIRST_MODIFIER && keysym <= LAST_MODIFIER) | |
164 | + { | |
165 | + /* TODO: fake local state */ | |
166 | + keystate[keysym - FIRST_MODIFIER] = down; | |
167 | + } | |
168 | + | |
169 | + if (down) | |
170 | + { | |
171 | + /* TODO: fake local state */ | |
172 | + if (handle_special_keys(keysym, 0, ev_time, True)) | |
173 | + return; | |
174 | + | |
175 | + /* TODO: fake local state */ | |
176 | + tr = xkeymap_translate_key(keysym, 0, 0); | |
177 | + | |
178 | + if (tr.scancode == 0) | |
179 | + return; | |
180 | + | |
181 | + ensure_remote_modifiers(ev_time, tr); | |
182 | + | |
183 | + rdp_send_scancode(ev_time, RDP_KEYPRESS, tr.scancode); | |
184 | + } | |
185 | + else | |
186 | + { | |
187 | + /* todO: fake local state */ | |
188 | + if (handle_special_keys(keysym, 0, ev_time, False)) | |
189 | + return; | |
190 | + | |
191 | + /* todO: fake local state */ | |
192 | + tr = xkeymap_translate_key(keysym, 0, 0); | |
193 | + | |
194 | + if (tr.scancode == 0) | |
195 | + return; | |
196 | + | |
197 | + rdp_send_scancode(ev_time, RDP_KEYRELEASE, tr.scancode); | |
198 | + } | |
199 | +} | |
200 | + | |
201 | +void | |
202 | +vncMouse(int buttonMask, int x, int y, struct _rfbClientRec *cl) | |
203 | +{ | |
204 | + int b; | |
205 | + uint32 ev_time = time(NULL); | |
206 | + | |
207 | + rdp_send_input(ev_time, RDP_INPUT_MOUSE, MOUSE_FLAG_MOVE, x, y); | |
208 | + | |
209 | + for (b = 0; b < 3; b++) | |
210 | + { | |
211 | + int bb = 1 << (b); | |
212 | + if (!(lastbuttons & bb) && (buttonMask & bb)) | |
213 | + { | |
214 | + rdp_send_input(ev_time, RDP_INPUT_MOUSE, | |
215 | + (mouseLookup[b]) | MOUSE_FLAG_DOWN, x, y); | |
216 | + } | |
217 | + else if ((lastbuttons & bb) && !(buttonMask & bb)) | |
218 | + { | |
219 | + rdp_send_input(ev_time, RDP_INPUT_MOUSE, (mouseLookup[b]), x, y); | |
220 | + } | |
221 | + } | |
222 | + lastbuttons = buttonMask; | |
223 | + | |
224 | + /* handle cursor */ | |
225 | + rfbDefaultPtrAddEvent(buttonMask, x, y, cl); | |
226 | +} | |
227 | + | |
228 | + | |
229 | +void | |
230 | +rdp2vnc_connect(char *server, uint32 flags, char *domain, char *password, | |
231 | + char *shell, char *directory) | |
232 | +{ | |
233 | + struct sockaddr addr; | |
234 | + fd_set fdset; | |
235 | + struct timeval tv; | |
236 | + int rfbListenSock, addrlen = sizeof(addr); | |
237 | + | |
238 | + rfbListenSock = rfbListenOnTCPPort(rfb_port); | |
239 | + fprintf(stderr, "Listening on VNC port %d\n", rfb_port); | |
240 | + if (rfbListenSock <= 0) | |
241 | + error("Cannot listen on port %d", rfb_port); | |
242 | + else | |
243 | + while (1) | |
244 | + { | |
245 | + FD_ZERO(&fdset); | |
246 | + FD_SET(rfbListenSock, &fdset); | |
247 | + tv.tv_sec = 5; | |
248 | + tv.tv_usec = 0; | |
249 | + if (select(rfbListenSock + 1, &fdset, NULL, NULL, &tv) > 0) | |
250 | + { | |
251 | + rfbClientSocket = accept(rfbListenSock, &addr, &addrlen); | |
252 | + if (rfbClientSocket < 0) | |
253 | + { | |
254 | + error("Error accepting client (%d: %s.\n", | |
255 | + errno, strerror(errno)); | |
256 | + continue; | |
257 | + } | |
258 | + ui_create_window(); | |
259 | + if (!rdp_connect(server, flags, domain, password, shell, directory)) | |
260 | + { | |
261 | + error("Error connecting to RDP server.\n"); | |
262 | + continue; | |
263 | + } | |
264 | + if (!fork()) | |
265 | + { | |
266 | + BOOL deactivated; | |
267 | + uint32_t ext_disc_reason; | |
268 | + printf("Connection successful.\n"); | |
269 | + rdp_main_loop(&deactivated, &ext_disc_reason); | |
270 | + printf("Disconnecting...\n"); | |
271 | + rdp_disconnect(); | |
272 | + ui_destroy_window(); | |
273 | + exit(0); | |
274 | + } | |
275 | + } | |
276 | + } | |
277 | +} | |
278 | + | |
279 | + | |
280 | + | |
281 | + | |
282 | + | |
283 | +extern char g_title[]; | |
284 | +BOOL | |
285 | +ui_create_window() | |
286 | +{ | |
287 | + int i; | |
288 | + | |
289 | + for (i = 0; i < 0x100; i++) | |
290 | + reverseByte[i] = | |
291 | + (((i >> 7) & 1)) | (((i >> 6) & 1) << 1) | (((i >> 5) & 1) << 2) | | |
292 | + (((i >> 4) & 1) << 3) | (((i >> 3) & 1) << 4) | (((i >> 2) & 1) << 5) | | |
293 | + (((i >> 1) & 1) << 6) | (((i >> 0) & 1) << 7); | |
294 | + | |
295 | + server = rfbGetScreen(0, NULL, g_width, g_height, 8, 1, 1); | |
296 | + server->desktopName = g_title; | |
297 | + server->frameBuffer = (char *) malloc(g_width * g_height); | |
298 | + server->ptrAddEvent = vncMouse; | |
299 | + server->kbdAddEvent = vncKey; | |
300 | +#ifdef ENABLE_SHADOW | |
301 | + server->httpPort = 6124 + client_counter; | |
302 | + server->port = 5924 + client_counter; | |
303 | + rfbInitSockets(server); | |
304 | + server->alwaysShared = TRUE; | |
305 | + server->neverShared = FALSE; | |
306 | +#else | |
307 | + server->port = -1; | |
308 | + server->alwaysShared = FALSE; | |
309 | + server->neverShared = FALSE; | |
310 | +#endif | |
311 | + server->inetdSock = rfbClientSocket; | |
312 | + server->serverFormat.trueColour = FALSE; /* activate colour maps */ | |
313 | + server->deferUpdateTime = defer_time; | |
314 | + | |
315 | + frameBuffer = (vncBuffer *) malloc(sizeof(vncBuffer)); | |
316 | + frameBuffer->w = g_width; | |
317 | + frameBuffer->h = g_height; | |
318 | + frameBuffer->linew = g_width; | |
319 | + frameBuffer->data = server->frameBuffer; | |
320 | + frameBuffer->owner = FALSE; | |
321 | + frameBuffer->format = &server->serverFormat; | |
322 | + | |
323 | + ui_set_clip(0, 0, g_width, g_height); | |
324 | + | |
325 | + rfbInitServer(server); | |
326 | +#ifndef ENABLE_SHADOW | |
327 | + server->port = rfb_port; | |
328 | +#else | |
329 | + fprintf(stderr, "server listening on port %d (socket %d)\n", server->port, | |
330 | + server->listenSock); | |
331 | +#endif | |
332 | + | |
333 | + init_keyboard(); | |
334 | + | |
335 | + return (server != NULL); | |
336 | +} | |
337 | + | |
338 | +void | |
339 | +ui_destroy_window() | |
340 | +{ | |
341 | + rfbCloseClient(server->clientHead); | |
342 | +} | |
343 | + | |
344 | + | |
345 | +int | |
346 | +ui_select(int rdpSocket) | |
347 | +{ | |
348 | + fd_set fds; | |
349 | + struct timeval tv; | |
350 | + int n, m = server->maxFd; | |
351 | + | |
352 | + if (rdpSocket > m) | |
353 | + m = rdpSocket; | |
354 | + while (1) | |
355 | + { | |
356 | + fds = server->allFds; | |
357 | + FD_SET(rdpSocket, &fds); | |
358 | + tv.tv_sec = defer_time / 1000; | |
359 | + tv.tv_usec = (defer_time % 1000) * 1000; | |
360 | + n = select(m + 1, &fds, NULL, NULL, &tv); | |
361 | + rfbProcessEvents(server, 0); | |
362 | + /* if client is gone, close connection */ | |
363 | + if (!server->clientHead) | |
364 | + close(rdpSocket); | |
365 | + if (FD_ISSET(rdpSocket, &fds)) | |
366 | + return 1; | |
367 | + } | |
368 | + return 0; | |
369 | +} | |
370 | + | |
371 | +void | |
372 | +ui_move_pointer(int x, int y) | |
373 | +{ | |
374 | + // TODO: Is there a way to send x,y even if cursor encoding is active? | |
375 | + rfbUndrawCursor(server); | |
376 | + server->cursorX = x; | |
377 | + server->cursorY = y; | |
378 | +} | |
379 | + | |
380 | +HBITMAP | |
381 | +ui_create_bitmap(int width, int height, uint8 * data) | |
382 | +{ | |
383 | + vncBuffer *buf; | |
384 | + | |
385 | + buf = vncNewBuffer(width, height, 8); | |
386 | + memcpy(buf->data, data, width * height); | |
387 | + | |
388 | + return (HBITMAP) buf; | |
389 | +} | |
390 | + | |
391 | +void | |
392 | +ui_paint_bitmap(int x, int y, int cx, int cy, int width, int height, uint8 * data) | |
393 | +{ | |
394 | + vncBuffer *buf; | |
395 | + buf = ui_create_bitmap(width, height, data); | |
396 | + vncCopyBlitFrom(server, x, y, cx, cy, buf, 0, 0); | |
397 | + vncDeleteBuffer(buf); | |
398 | +} | |
399 | + | |
400 | +void | |
401 | +ui_destroy_bitmap(HBITMAP bmp) | |
402 | +{ | |
403 | + vncDeleteBuffer((vncBuffer *) bmp); | |
404 | +} | |
405 | + | |
406 | +uint8_t | |
407 | +vncLookupColour(rfbColourMap * colourMap, uint8_t * p) | |
408 | +{ | |
409 | + uint8_t i, i1 = 0; | |
410 | + uint8_t *cm = colourMap->data.bytes; | |
411 | + uint32_t m, m1 = abs(cm[0] - p[0]) + abs(cm[1] - p[1]) + abs(cm[2] - p[2]); | |
412 | + for (i = 1; i < 255; i++) | |
413 | + { | |
414 | + m = abs(cm[i * 3] - p[0]) + abs(cm[i * 3 + 1] - p[1]) + abs(cm[i * 3 + 2] - p[2]); | |
415 | + if (m < m1) | |
416 | + { | |
417 | + m1 = m; | |
418 | + i1 = i; | |
419 | + } | |
420 | + } | |
421 | + return (i1); | |
422 | +} | |
423 | + | |
424 | +HCURSOR | |
425 | +ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 * mask, uint8 * data) | |
426 | +{ | |
427 | + int i, j; | |
428 | + uint8_t *d0, *d1; | |
429 | + uint8_t *cdata; | |
430 | + uint8_t white[3] = { 0xff, 0xff, 0xff }; | |
431 | + uint8_t black[3] = { 0, 0, 0 }; | |
432 | + uint8_t *cur; | |
433 | + rfbCursorPtr cursor; | |
434 | + rfbColourMap *colourMap = &server->colourMap; | |
435 | + | |
436 | + cdata = xmalloc(sizeof(uint8_t) * width * height); | |
437 | + d0 = xmalloc(sizeof(uint32_t) * width * height / 4); | |
438 | + d1 = (uint8_t *) mask; | |
439 | + for (j = 0; j < height; j++) | |
440 | + for (i = 0; i < width / 8; i++) | |
441 | + { | |
442 | + d0[j * width / 8 + i] = d1[(height - 1 - j) * width / 8 + i] ^ 0xffffffff; | |
443 | + } | |
444 | + for (j = 0; j < height; j++) | |
445 | + { | |
446 | + for (i = 0; i < width; i++) | |
447 | + { | |
448 | + //strange that the pointer is in 24bit depth when everything | |
449 | + //else is in 8bit palletized. | |
450 | + cur = data + ((height - 1 - j) * width + i) * 3; | |
451 | + if (cur[0] > 0x80 || cur[1] > 0x80 || cur[2] > 0x80) | |
452 | + { | |
453 | + if (!(d0[(j * width + i) / 8] & (0x80 >> (i & 7)))) | |
454 | + { | |
455 | + /* text cursor! */ | |
456 | + cdata[j * width + i] = vncLookupColour(colourMap, black); | |
457 | + d0[(j * width + i) / 8] |= 0x80 >> (i & 7); | |
458 | + } | |
459 | + else | |
460 | + cdata[j * width + i] = vncLookupColour(colourMap, white); | |
461 | + } | |
462 | + else | |
463 | + cdata[j * width + i] = vncLookupColour(colourMap, cur); | |
464 | + } | |
465 | + } | |
466 | + cursor = (rfbCursorPtr) xmalloc(sizeof(rfbCursor)); | |
467 | + cursor->width = width; | |
468 | + cursor->height = height; | |
469 | + cursor->xhot = x; | |
470 | + cursor->yhot = y; | |
471 | + cursor->mask = (char *) d0; | |
472 | + cursor->source = 0; | |
473 | + cursor->richSource = cdata; | |
474 | + cursor->cleanup = 0; // workaround: this produces a memleak | |
475 | + | |
476 | + cursor->backRed = cursor->backGreen = cursor->backBlue = 0xffff; | |
477 | + cursor->foreRed = cursor->foreGreen = cursor->foreBlue = 0; | |
478 | + | |
479 | + return (HCURSOR) cursor; | |
480 | +} | |
481 | + | |
482 | +void | |
483 | +ui_set_cursor(HCURSOR cursor) | |
484 | +{ | |
485 | + /* FALSE means: don't delete old cursor */ | |
486 | + rfbSetCursor(server, (rfbCursorPtr) cursor, FALSE); | |
487 | +} | |
488 | + | |
489 | +void | |
490 | +ui_destroy_cursor(HCURSOR cursor) | |
491 | +{ | |
492 | + if (cursor) | |
493 | + rfbFreeCursor((rfbCursorPtr) cursor); | |
494 | +} | |
495 | + | |
496 | +void | |
497 | +ui_set_null_cursor(void) | |
498 | +{ | |
499 | + rfbSetCursor(server, 0, FALSE); | |
500 | +} | |
501 | + | |
502 | +HGLYPH | |
503 | +ui_create_glyph(int width, int height, uint8 * data) | |
504 | +{ | |
505 | + int x, y; | |
506 | + vncBuffer *buf; | |
507 | + | |
508 | + buf = vncNewBuffer(width, height, 8); | |
509 | + | |
510 | + //data is padded to multiple of 16bit line lengths | |
511 | + for (y = 0; y < height; y++) | |
512 | + { | |
513 | + for (x = 0; x < width; x++) | |
514 | + { | |
515 | + int byte = x / 8 + (y * ((width + 7) / 8)); | |
516 | + byte = rfbEndianTest ? reverseByte[data[byte]] : data[byte]; | |
517 | + byte = (byte >> (x & 7)) & 0x01; | |
518 | + vncSetPixel(buf, x, y, byte ? 0x7f : 0x00); | |
519 | + } | |
520 | + } | |
521 | + | |
522 | + return (HGLYPH) buf; | |
523 | +} | |
524 | + | |
525 | +void | |
526 | +ui_destroy_glyph(HGLYPH glyph) | |
527 | +{ | |
528 | + ui_destroy_bitmap((HBITMAP) glyph); | |
529 | +} | |
530 | + | |
531 | +HCOLOURMAP | |
532 | +ui_create_colourmap(COLOURMAP * colours) | |
533 | +{ | |
534 | + int i; | |
535 | + rfbColourMap *map = vncNewColourMap(server, colours->ncolours); | |
536 | + for (i = 0; i < colours->ncolours; i++) | |
537 | + { | |
538 | + vncSetColourMapEntry(map, i, colours->colours[i].red, | |
539 | + colours->colours[i].green, colours->colours[i].blue); | |
540 | + } | |
541 | + return map; | |
542 | +} | |
543 | + | |
544 | +void | |
545 | +ui_destroy_colourmap(HCOLOURMAP map) | |
546 | +{ | |
547 | + vncDeleteColourMap(map); | |
548 | +} | |
549 | + | |
550 | +void | |
551 | +ui_set_colourmap(HCOLOURMAP map) | |
552 | +{ | |
553 | + vncSetColourMap(server, map); | |
554 | +} | |
555 | + | |
556 | +void | |
557 | +ui_set_clip(int x, int y, int cx, int cy) | |
558 | +{ | |
559 | + clipX = x; | |
560 | + clipY = y; | |
561 | + clipW = cx; | |
562 | + clipH = cy; | |
563 | +} | |
564 | + | |
565 | +void | |
566 | +ui_reset_clip() | |
567 | +{ | |
568 | + clipX = 0; | |
569 | + clipY = 0; | |
570 | + clipW = 64000; | |
571 | + clipH = 64000; | |
572 | +} | |
573 | + | |
574 | +void | |
575 | +ui_bell() | |
576 | +{ | |
577 | + rfbSendBell(server); | |
578 | +} | |
579 | + | |
580 | +void | |
581 | +ui_destblt(uint8 opcode, | |
582 | + /* dest */ int x, int y, int cx, int cy) | |
583 | +{ | |
584 | + int i; | |
585 | + vncBuffer *buf; | |
586 | + | |
587 | + switch (opcode) | |
588 | + { | |
589 | + case 0: | |
590 | + case 15: | |
591 | + ui_rect(x, y, cx, cy, 0xff); | |
592 | + break; | |
593 | + case 5: // invert | |
594 | + buf = vncGetRect(server, x, y, cx, cy); | |
595 | + for (i = 0; i < cx * cy; i++) | |
596 | + ((char *) (buf->data))[i] = !((char *) (buf->data))[i]; | |
597 | + break; | |
598 | + default: | |
599 | + unimpl("ui_destblt: opcode=%d %d,%d %dx%d\n", opcode, x, y, cx, cy); | |
600 | + } | |
601 | +} | |
602 | + | |
603 | +void | |
604 | +ui_patblt(uint8 opcode, | |
605 | + /* dest */ int x, int y, int cx, int cy, | |
606 | + /* brush */ BRUSH * brush, int bgcolour, int fgcolour) | |
607 | +{ | |
608 | + switch (brush->style) | |
609 | + { | |
610 | + case 0: /* Solid */ | |
611 | + switch (opcode) | |
612 | + { | |
613 | + case ROP2_XOR: | |
614 | + { | |
615 | + int xx, yy; | |
616 | + vncBuffer *fill = vncNewBuffer(cx, cy, 8); | |
617 | + for (yy = 0; yy < cy; yy++) | |
618 | + for (xx = 0; xx < cx; xx++) | |
619 | + vncSetPixel(fill, xx, yy, fgcolour); | |
620 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
621 | + vncXorBlitFrom(server, x, y, cx, cy, fill, | |
622 | + 0, 0); | |
623 | + break; | |
624 | + } | |
625 | + | |
626 | + default: | |
627 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
628 | + vncSetRect(server, x, y, cx, cy, fgcolour); | |
629 | + } | |
630 | + break; | |
631 | + | |
632 | + case 3: /* Pattern */ | |
633 | + { | |
634 | + int xx, yy; | |
635 | + vncBuffer *fill; | |
636 | + fill = (vncBuffer *) ui_create_glyph(8, 8, brush->pattern); | |
637 | + | |
638 | + for (yy = 0; yy < 8; yy++) | |
639 | + { | |
640 | + for (xx = 0; xx < 8; xx++) | |
641 | + { | |
642 | + vncSetPixel(fill, xx, yy, | |
643 | + vncGetPixel(fill, xx, | |
644 | + yy) ? fgcolour : bgcolour); | |
645 | + } | |
646 | + } | |
647 | + | |
648 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
649 | + { | |
650 | + switch (opcode) | |
651 | + { | |
652 | + case ROP2_COPY: | |
653 | + vncCopyBlitFrom(server, x, y, cx, cy, fill, | |
654 | + 0, 0); | |
655 | + break; | |
656 | + case ROP2_XOR: | |
657 | + vncXorBlitFrom(server, x, y, cx, cy, fill, | |
658 | + 0, 0); | |
659 | + break; | |
660 | + default: | |
661 | + unimpl("pattern blit (%d,%d) opcode=%d bg=%d fg=%d\n", x, y, opcode, bgcolour, fgcolour); | |
662 | + vncCopyBlitFrom(server, x, y, cx, cy, fill, | |
663 | + 0, 0); | |
664 | + break; | |
665 | + } | |
666 | + } | |
667 | + | |
668 | + ui_destroy_glyph((HGLYPH) fill); | |
669 | + break; | |
670 | + | |
671 | + } | |
672 | + default: | |
673 | + unimpl("brush %d\n", brush->style); | |
674 | + } | |
675 | +} | |
676 | + | |
677 | +void | |
678 | +ui_screenblt(uint8 opcode, | |
679 | + /* dest */ int x, int y, int cx, int cy, | |
680 | + /* src */ int srcx, int srcy) | |
681 | +{ | |
682 | + int ox, oy; | |
683 | + | |
684 | + ox = x; | |
685 | + oy = y; | |
686 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
687 | + { | |
688 | + //if we clipped top or left, we have to adjust srcx,srcy; | |
689 | + srcx += x - ox; | |
690 | + srcy += y - oy; | |
691 | + vncCopyBlit(server, x, y, cx, cy, srcx, srcy); | |
692 | + } | |
693 | +} | |
694 | + | |
695 | +void | |
696 | +ui_memblt(uint8 opcode, | |
697 | + /* dest */ int x, int y, int cx, int cy, | |
698 | + /* src */ HBITMAP src, int srcx, int srcy) | |
699 | +{ | |
700 | + int ox, oy; | |
701 | + ox = x; | |
702 | + oy = y; | |
703 | + | |
704 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
705 | + { | |
706 | + //if we clipped top or left, we have to adjust srcx,srcy; | |
707 | + srcx += x - ox; | |
708 | + srcy += y - oy; | |
709 | + switch (ROP2_S(opcode)) | |
710 | + { | |
711 | + case ROP2_OR: | |
712 | + vncTransBlitFrom(server, x, y, cx, cy, (vncBuffer *) src, srcx, | |
713 | + srcy, 0x0); | |
714 | + break; | |
715 | + case ROP2_XOR: | |
716 | + vncXorBlitFrom(server, x, y, cx, cy, (vncBuffer *) src, srcx, srcy); | |
717 | + break; | |
718 | + case ROP2_AND: | |
719 | + vncAndBlitFrom(server, x, y, cx, cy, (vncBuffer *) src, srcx, srcy); | |
720 | + break; | |
721 | + case ROP2_COPY: | |
722 | + vncCopyBlitFrom(server, x, y, cx, cy, (vncBuffer *) src, srcx, | |
723 | + srcy); | |
724 | + break; | |
725 | + default: | |
726 | + unimpl("ui_memblt: op%d %d,%d %dx%d\n", opcode, x, y, cx, cy); | |
727 | + vncCopyBlitFrom(server, x, y, cx, cy, (vncBuffer *) src, srcx, | |
728 | + srcy); | |
729 | + break; | |
730 | + } | |
731 | + } | |
732 | +} | |
733 | + | |
734 | +void | |
735 | +ui_triblt(uint8 opcode, | |
736 | + /* dest */ int x, int y, int cx, int cy, | |
737 | + /* src */ HBITMAP src, int srcx, int srcy, | |
738 | + /* brush */ BRUSH * brush, int bgcolour, int fgcolour) | |
739 | +{ | |
740 | + /* This is potentially difficult to do in general. Until someone | |
741 | + comes up with a more efficient way of doing it I am using cases. */ | |
742 | + | |
743 | + switch (opcode) | |
744 | + { | |
745 | + case 0x69: /* PDSxxn */ | |
746 | + ui_memblt(ROP2_XOR, x, y, cx, cy, src, srcx, srcy); | |
747 | + ui_patblt(ROP2_NXOR, x, y, cx, cy, brush, bgcolour, fgcolour); | |
748 | + break; | |
749 | + | |
750 | + case 0xb8: /* PSDPxax */ | |
751 | + ui_patblt(ROP2_XOR, x, y, cx, cy, brush, bgcolour, fgcolour); | |
752 | + ui_memblt(ROP2_AND, x, y, cx, cy, src, srcx, srcy); | |
753 | + ui_patblt(ROP2_XOR, x, y, cx, cy, brush, bgcolour, fgcolour); | |
754 | + break; | |
755 | + | |
756 | + default: | |
757 | + unimpl("ui_triblt 1x%x\n", opcode); | |
758 | + ui_memblt(ROP2_COPY, x, y, cx, cy, src, srcx, srcy); | |
759 | + } | |
760 | + | |
761 | +} | |
762 | + | |
763 | +void | |
764 | +ui_line(uint8 opcode, | |
765 | + /* dest */ int startx, int starty, int endx, int endy, | |
766 | + /* pen */ PEN * pen) | |
767 | +{ | |
768 | + //vncSetRect(server,startx,starty,1+endx-startx,endy-starty,pen->colour); | |
769 | + //unimpl("drawline: pen colour=%d\n",pen->colour); | |
770 | + /* TODO: implement opcodes */ | |
771 | + rfbDrawLine(server, startx, starty, endx, endy, pen->colour); | |
772 | +} | |
773 | + | |
774 | +void | |
775 | +ui_rect( | |
776 | + /* dest */ int x, int y, int cx, int cy, | |
777 | + /* brush */ int colour) | |
778 | +{ | |
779 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
780 | + { | |
781 | + vncSetRect(server, x, y, cx, cy, colour); | |
782 | + } | |
783 | +} | |
784 | + | |
785 | +void | |
786 | +ui_draw_glyph(int mixmode, | |
787 | + /* dest */ int x, int y, int cx, int cy, | |
788 | + /* src */ HGLYPH glyph, int srcx, int srcy, | |
789 | + /* colours */ int bgcolour, int fgcolour) | |
790 | +{ | |
791 | + int xx, yy; | |
792 | + int ox, oy; | |
793 | + vncBuffer *buf = vncDupBuffer(glyph); | |
794 | + | |
795 | + x &= 0xffff; | |
796 | + y &= 0xffff; | |
797 | + | |
798 | + /* yes, sometimes same fgcolour and bgcolour are sent, but because | |
799 | + * of transparency, we have to change that! */ | |
800 | + if (mixmode == MIX_TRANSPARENT && fgcolour == bgcolour) | |
801 | + bgcolour = fgcolour ^ 0xff; | |
802 | + | |
803 | + ox = x; | |
804 | + oy = y; | |
805 | + | |
806 | + for (yy = srcy; yy < srcy + cy; yy++) | |
807 | + { | |
808 | + for (xx = srcx; xx < srcx + cx; xx++) | |
809 | + { | |
810 | + vncSetPixel(buf, xx, yy, vncGetPixel(buf, xx, yy) ? fgcolour : bgcolour); | |
811 | + } | |
812 | + } | |
813 | + | |
814 | + switch (mixmode) | |
815 | + { | |
816 | + case MIX_TRANSPARENT: | |
817 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
818 | + { | |
819 | + //if we clipped top or left, we have to adjust srcx,srcy; | |
820 | + srcx += x - ox; | |
821 | + srcy += y - oy; | |
822 | + vncTransBlitFrom(server, x, y, cx, cy, buf, srcx, srcy, bgcolour); | |
823 | + } | |
824 | + break; | |
825 | + case MIX_OPAQUE: | |
826 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
827 | + { | |
828 | + //if we clipped top or left, we have to adjust srcx,srcy; | |
829 | + srcx += x - ox; | |
830 | + srcy += y - oy; | |
831 | + vncCopyBlitFrom(server, x, y, cx, cy, buf, srcx, srcy); | |
832 | + } | |
833 | + break; | |
834 | + | |
835 | + default: | |
836 | + unimpl("mix %d\n", mixmode); | |
837 | + } | |
838 | + vncDeleteBuffer(buf); | |
839 | +} | |
840 | + | |
841 | +#define DO_GLYPH(ttext,idx) \ | |
842 | +{\ | |
843 | + glyph = cache_get_font (font, ttext[idx]);\ | |
844 | + if (!(flags & TEXT2_IMPLICIT_X))\ | |
845 | + {\ | |
846 | + offset = ttext[++idx];\ | |
847 | + if ((offset & 0x80))\ | |
848 | + offset = ((offset & 0x7f) << 8) | ttext[++idx];\ | |
849 | + if (flags & TEXT2_VERTICAL)\ | |
850 | + y += offset;\ | |
851 | + else\ | |
852 | + x += offset;\ | |
853 | + }\ | |
854 | + if (glyph != NULL)\ | |
855 | + {\ | |
856 | + ui_draw_glyph (mixmode, x + (short) glyph->offset,\ | |
857 | + y + (short) glyph->baseline,\ | |
858 | + glyph->width, glyph->height,\ | |
859 | + glyph->pixmap, 0, 0, bgcolour, fgcolour);\ | |
860 | + if (flags & TEXT2_IMPLICIT_X)\ | |
861 | + x += glyph->width;\ | |
862 | + }\ | |
863 | +} | |
864 | + | |
865 | + | |
866 | +void | |
867 | +ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y, | |
868 | + int clipx, int clipy, int clipcx, int clipcy, | |
869 | + int boxx, int boxy, int boxcx, int boxcy, | |
870 | + int bgcolour, int fgcolour, uint8 * text, uint8 length) | |
871 | +{ | |
872 | + FONTGLYPH *glyph; | |
873 | + int i, j, offset; | |
874 | + DATABLOB *entry; | |
875 | + | |
876 | + if (boxcx > 1) | |
877 | + { | |
878 | + ui_rect(boxx, boxy, boxcx, boxcy, bgcolour); | |
879 | + } | |
880 | + else if (mixmode == MIX_OPAQUE) | |
881 | + { | |
882 | + ui_rect(clipx, clipy, clipcx, clipcy, bgcolour); | |
883 | + } | |
884 | + | |
885 | + /* Paint text, character by character */ | |
886 | + for (i = 0; i < length;) | |
887 | + { | |
888 | + switch (text[i]) | |
889 | + { | |
890 | + case 0xff: | |
891 | + if (i + 2 < length) | |
892 | + cache_put_text(text[i + 1], &(text[i - text[i + 2]]), | |
893 | + text[i + 2]); | |
894 | + else | |
895 | + { | |
896 | + error("this shouldn't be happening\n"); | |
897 | + break; | |
898 | + } | |
899 | + /* this will move pointer from start to first character after FF command */ | |
900 | + length -= i + 3; | |
901 | + text = &(text[i + 3]); | |
902 | + i = 0; | |
903 | + break; | |
904 | + | |
905 | + case 0xfe: | |
906 | + entry = cache_get_text(text[i + 1]); | |
907 | + if (entry != NULL) | |
908 | + { | |
909 | + if ((((uint8 *) (entry->data))[1] == 0) | |
910 | + && (!(flags & TEXT2_IMPLICIT_X))) | |
911 | + { | |
912 | + if (flags & 0x04) /* vertical text */ | |
913 | + y += text[i + 2]; | |
914 | + else | |
915 | + x += text[i + 2]; | |
916 | + } | |
917 | + if (i + 2 < length) | |
918 | + i += 3; | |
919 | + else | |
920 | + i += 2; | |
921 | + length -= i; | |
922 | + /* this will move pointer from start to first character after FE command */ | |
923 | + text = &(text[i]); | |
924 | + i = 0; | |
925 | + for (j = 0; j < entry->size; j++) | |
926 | + DO_GLYPH(((uint8 *) (entry->data)), j); | |
927 | + } | |
928 | + break; | |
929 | + default: | |
930 | + DO_GLYPH(text, i); | |
931 | + i++; | |
932 | + break; | |
933 | + } | |
934 | + } | |
935 | +} | |
936 | + | |
937 | +void | |
938 | +ui_desktop_save(uint32 offset, int x, int y, int cx, int cy) | |
939 | +{ | |
940 | + vncBuffer *buf; | |
941 | + | |
942 | + buf = vncGetRect(server, x, y, cx, cy); | |
943 | + offset *= TOBYTES(server->serverFormat.bitsPerPixel); | |
944 | + cache_put_desktop(offset, cx, cy, cx, TOBYTES(server->serverFormat.bitsPerPixel), | |
945 | + (buf->data)); | |
946 | +} | |
947 | + | |
948 | +void | |
949 | +ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy) | |
950 | +{ | |
951 | + uint8 *data; | |
952 | + vncBuffer *buf; | |
953 | + int ox, oy, srcx, srcy; | |
954 | + | |
955 | + srcx = srcy = 0; | |
956 | + ox = x; | |
957 | + oy = y; | |
958 | + | |
959 | + offset *= TOBYTES(server->serverFormat.bitsPerPixel); | |
960 | + data = cache_get_desktop(offset, cx, cy, TOBYTES(server->serverFormat.bitsPerPixel)); | |
961 | + if (data == NULL) | |
962 | + return; | |
963 | + | |
964 | + buf = vncNewBuffer(cx, cy, 8); | |
965 | + memcpy(buf->data, data, cx * cy * 1); | |
966 | + | |
967 | + if (vncwinClipRect(&x, &y, &cx, &cy)) | |
968 | + { | |
969 | + srcx += x - ox; | |
970 | + srcy += y - oy; | |
971 | + vncCopyBlitFrom(server, x, y, cx, cy, buf, srcx, srcy); | |
972 | + } | |
973 | + vncDeleteBuffer(buf); | |
974 | +} | |
975 | + | |
976 | +rfbPixelFormat vnc_formats[] = { | |
977 | + /* bpp, depth,BE,TC, rmax, gmax, bmax, rsh, gsh, bsh */ | |
978 | + {8, 8, 1, 0, 7, 7, 3, 0, 3, 6} | |
979 | + , | |
980 | + {16, 16, 1, 1, 31, 63, 31, 0, 5, 10} | |
981 | + , | |
982 | + {32, 24, 1, 1, 255, 255, 255, 0, 8, 16} | |
983 | + , //non-existant | |
984 | + {32, 32, 1, 1, 2047, 2047, 1023, 0, 11, 22} | |
985 | +}; | |
986 | + | |
987 | +rfbPixelFormat * | |
988 | +vncNewFormat(int depth) | |
989 | +{ | |
990 | + return &(vnc_formats[(depth + 1) / 8 - 1]); | |
991 | +} | |
992 | + | |
993 | +vncBuffer * | |
994 | +vncNewBuffer(int w, int h, int depth) | |
995 | +{ | |
996 | + vncBuffer *b = (vncBuffer *) xmalloc(sizeof(vncBuffer)); | |
997 | + b->format = vncNewFormat(depth); | |
998 | + b->data = (void *) xmalloc(w * h * (b->format->bitsPerPixel / 8)); | |
999 | + b->owner = 1; | |
1000 | + b->w = w; | |
1001 | + b->h = h; | |
1002 | + b->linew = w; | |
1003 | + return b; | |
1004 | +} | |
1005 | + | |
1006 | +vncBuffer * | |
1007 | +vncDupBuffer(vncBuffer * b) | |
1008 | +{ | |
1009 | + vncBuffer *buf = vncNewBuffer(b->w, b->h, b->format->depth); | |
1010 | + memcpy(buf->data, b->data, b->linew * b->h * b->format->bitsPerPixel / 8); | |
1011 | + return buf; | |
1012 | +} | |
1013 | + | |
1014 | +void | |
1015 | +vncPrintStats() | |
1016 | +{ | |
1017 | + if (server && server->clientHead) | |
1018 | + rfbPrintStats(server->clientHead); | |
1019 | +} | |
1020 | + | |
1021 | +/* blit */ | |
1022 | + | |
1023 | +#define GETPIXEL(buf,x,y) \ | |
1024 | + (((uint8_t*)(buf->data))[(x)+((y)*buf->linew)]) | |
1025 | +#define SETPIXEL(buf,x,y,p) \ | |
1026 | + (((uint8_t*)(buf->data))[(x)+((y)*buf->linew)] = (uint8_t)p) | |
1027 | + | |
1028 | +void | |
1029 | +vncCopyBlitFromNoEncode(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1030 | + vncBuffer * src, int srcx, int srcy) | |
1031 | +{ | |
1032 | + int xx, yy; | |
1033 | + | |
1034 | + vncHideCursor(); | |
1035 | + | |
1036 | + if (s->serverFormat.bitsPerPixel == src->format->bitsPerPixel | |
1037 | + && srcx + w <= src->w && srcy + h <= src->h) | |
1038 | + { | |
1039 | + //simple copy | |
1040 | + uint8_t *srcdata, *dstdata; | |
1041 | + srcdata = src->data + (srcy * src->linew + srcx); | |
1042 | + dstdata = s->frameBuffer + (y * s->paddedWidthInBytes + x); | |
1043 | + for (yy = 0; yy < h; yy++) | |
1044 | + { | |
1045 | + memcpy(dstdata, srcdata, w); | |
1046 | + dstdata += s->paddedWidthInBytes; | |
1047 | + srcdata += src->linew; | |
1048 | + } | |
1049 | + } | |
1050 | + else | |
1051 | + { | |
1052 | + // xsrc,ysrc provide tiling copy support. | |
1053 | + for (yy = y; yy < y + h; yy++) | |
1054 | + { | |
1055 | + int ysrc = srcy + yy - y; | |
1056 | + while (ysrc >= src->h) | |
1057 | + ysrc -= src->h; | |
1058 | + for (xx = x; xx < x + w; xx++) | |
1059 | + { | |
1060 | + vncPixel p; | |
1061 | + int xsrc = srcx + xx - x; | |
1062 | + while (xsrc >= src->linew) | |
1063 | + xsrc -= src->linew; | |
1064 | + p = GETPIXEL(src, xsrc, ysrc); | |
1065 | + SETPIXEL(frameBuffer, xx, yy, p); | |
1066 | + } | |
1067 | + } | |
1068 | + } | |
1069 | +} | |
1070 | + | |
1071 | +void | |
1072 | +vncCopyBlit(rfbScreenInfoPtr s, int x, int y, int w, int h, int srcx, int srcy) | |
1073 | +{ | |
1074 | + /* LibVNCServer already knows how to copy the data. */ | |
1075 | + rfbDoCopyRect(s, x, y, x + w, y + h, x - srcx, y - srcy); | |
1076 | +} | |
1077 | + | |
1078 | +void | |
1079 | +vncCopyBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, vncBuffer * src, int srcx, int srcy) | |
1080 | +{ | |
1081 | + vncCopyBlitFromNoEncode(s, x, y, w, h, src, srcx, srcy); | |
1082 | + rfbMarkRectAsModified(s, x, y, x + w, y + h); | |
1083 | +} | |
1084 | + | |
1085 | +void | |
1086 | +vncTransBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1087 | + vncBuffer * src, int srcx, int srcy, int bg) | |
1088 | +{ | |
1089 | + int xx, yy; | |
1090 | + | |
1091 | + vncHideCursor(); | |
1092 | + | |
1093 | + // xsrc,ysrc provide tiling copy support. | |
1094 | + for (yy = y; yy < y + h; yy++) | |
1095 | + { | |
1096 | + int ysrc = srcy + yy - y; | |
1097 | + while (ysrc >= src->h) | |
1098 | + ysrc -= src->h; | |
1099 | + for (xx = x; xx < x + w; xx++) | |
1100 | + { | |
1101 | + vncPixel p; | |
1102 | + int xsrc = srcx + xx - x; | |
1103 | + while (xsrc >= src->linew) | |
1104 | + xsrc -= src->linew; | |
1105 | + p = GETPIXEL(src, xsrc, ysrc); | |
1106 | + // transparent blit! | |
1107 | + if (p != bg) | |
1108 | + SETPIXEL(frameBuffer, xx, yy, p); | |
1109 | + } | |
1110 | + } | |
1111 | + | |
1112 | + rfbMarkRectAsModified(s, x, y, x + w, y + h); | |
1113 | +} | |
1114 | + | |
1115 | +void | |
1116 | +vncXorBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, vncBuffer * src, int srcx, int srcy) | |
1117 | +{ | |
1118 | + int xx, yy; | |
1119 | + | |
1120 | + vncHideCursor(); | |
1121 | + | |
1122 | + // xsrc,ysrc provide tiling copy support. | |
1123 | + for (yy = y; yy < y + h; yy++) | |
1124 | + { | |
1125 | + int ysrc = srcy + yy - y; | |
1126 | + while (ysrc >= src->h) | |
1127 | + ysrc -= src->h; | |
1128 | + for (xx = x; xx < x + w; xx++) | |
1129 | + { | |
1130 | + vncPixel p, pp; | |
1131 | + int xsrc = srcx + xx - x; | |
1132 | + while (xsrc >= src->linew) | |
1133 | + xsrc -= src->linew; | |
1134 | + p = GETPIXEL(src, xsrc, ysrc); | |
1135 | + pp = GETPIXEL(frameBuffer, xx, yy); | |
1136 | + // xor blit! | |
1137 | + SETPIXEL(frameBuffer, xx, yy, p ^ pp); | |
1138 | + } | |
1139 | + } | |
1140 | + | |
1141 | + rfbMarkRectAsModified(s, x, y, x + w, y + h); | |
1142 | +} | |
1143 | + | |
1144 | +void | |
1145 | +vncAndBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, vncBuffer * src, int srcx, int srcy) | |
1146 | +{ | |
1147 | + int xx, yy; | |
1148 | + | |
1149 | + vncHideCursor(); | |
1150 | + | |
1151 | + // xsrc,ysrc provide tiling copy support. | |
1152 | + for (yy = y; yy < y + h; yy++) | |
1153 | + { | |
1154 | + int ysrc = srcy + yy - y; | |
1155 | + while (ysrc >= src->h) | |
1156 | + ysrc -= src->h; | |
1157 | + for (xx = x; xx < x + w; xx++) | |
1158 | + { | |
1159 | + vncPixel p, pp; | |
1160 | + int xsrc = srcx + xx - x; | |
1161 | + while (xsrc >= src->linew) | |
1162 | + xsrc -= src->linew; | |
1163 | + p = GETPIXEL(src, xsrc, ysrc); | |
1164 | + pp = GETPIXEL(frameBuffer, xx, yy); | |
1165 | + // and blit! | |
1166 | + SETPIXEL(frameBuffer, xx, yy, p & pp); | |
1167 | + } | |
1168 | + } | |
1169 | + | |
1170 | + rfbMarkRectAsModified(s, x, y, x + w, y + h); | |
1171 | +} | |
1172 | + | |
1173 | +void | |
1174 | +vncDeleteBuffer(vncBuffer * b) | |
1175 | +{ | |
1176 | + if (b->owner) | |
1177 | + xfree(b->data); | |
1178 | + xfree(b); | |
1179 | +} | |
1180 | + | |
1181 | +/* cursor */ | |
1182 | +rfbCursorPtr | |
1183 | +vncNewCursor(vncBuffer * mask, vncBuffer * pointer, int hotx, int hoty) | |
1184 | +{ | |
1185 | + int i, j, w = (mask->w + 7) / 8, mask_size = w * mask->h, | |
1186 | + pointer_size = pointer->w * pointer->h; | |
1187 | + rfbCursorPtr c = (rfbCursorPtr) xmalloc(sizeof(rfbCursor)); | |
1188 | + | |
1189 | + if (mask->w != pointer->w || mask->h != pointer->h) | |
1190 | + error("ERROR! Mask is %dx%d, Pointer is %dx%d\n", | |
1191 | + mask->w, mask->h, pointer->w, pointer->h); | |
1192 | + | |
1193 | + c->xhot = hotx; | |
1194 | + c->yhot = hoty; | |
1195 | + c->width = mask->w; | |
1196 | + c->height = mask->h; | |
1197 | + | |
1198 | + c->mask = (char *) xmalloc(mask_size); | |
1199 | + for (j = 0; j < c->height; j++) | |
1200 | + for (i = 0; i < w; i++) | |
1201 | + c->mask[j * w + i] = | |
1202 | + reverseByte[((unsigned char *) mask->data)[(j) * w + i]]; | |
1203 | + vncDeleteBuffer(mask); | |
1204 | + | |
1205 | + c->source = 0; | |
1206 | + c->richSource = (char *) xmalloc(pointer_size); | |
1207 | + memcpy(c->richSource, pointer->data, pointer_size); | |
1208 | + vncDeleteBuffer(pointer); | |
1209 | + | |
1210 | + return c; | |
1211 | +} | |
1212 | + | |
1213 | +/* No FreeCursor, because the cursors are buffered. We only get a "HANDLE" */ | |
1214 | +void | |
1215 | +vncSetCursor(rfbScreenInfoPtr s, rfbCursorPtr c) | |
1216 | +{ | |
1217 | + rfbSetCursor(s, c, FALSE); | |
1218 | +} | |
1219 | + | |
1220 | +/* these functions work even if vncBuffer's pixel format is not 1 byte/pixel */ | |
1221 | +vncPixel | |
1222 | +vncGetPixel(vncBuffer * b, int x, int y) | |
1223 | +{ | |
1224 | + unsigned long offset = (x + (y * (b->linew))) * (b->format->bitsPerPixel >> 3); | |
1225 | + return ((uint8_t *) (b->data))[offset]; | |
1226 | +} | |
1227 | + | |
1228 | +void | |
1229 | +vncSetPixel(vncBuffer * b, int x, int y, vncPixel c) | |
1230 | +{ | |
1231 | + unsigned long offset = (x + (y * (b->linew))) * (b->format->bitsPerPixel >> 3); | |
1232 | + ((uint8_t *) (b->data))[offset] = c; | |
1233 | +} | |
1234 | + | |
1235 | +void | |
1236 | +vncSetRect(rfbScreenInfoPtr s, int x, int y, int w, int h, vncPixel c) | |
1237 | +{ | |
1238 | + int xx, yy; | |
1239 | + | |
1240 | + if (x + w > s->width) | |
1241 | + w = s->width - x; | |
1242 | + if (y + h > s->height) | |
1243 | + h = s->height - y; | |
1244 | + if (w <= 0 || h <= 0) | |
1245 | + return; | |
1246 | + | |
1247 | + vncHideCursor(); | |
1248 | + | |
1249 | + // - Fill the rect in the local framebuffer | |
1250 | + if (s->serverFormat.bitsPerPixel == 8) | |
1251 | + { | |
1252 | + // - Simple 8-bit fill | |
1253 | + uint8_t *dstdata; | |
1254 | + dstdata = s->frameBuffer + (y * s->paddedWidthInBytes + x); | |
1255 | + for (yy = 0; yy < h; yy++) | |
1256 | + { | |
1257 | + memset(dstdata, c, w); | |
1258 | + dstdata += s->paddedWidthInBytes; | |
1259 | + } | |
1260 | + } | |
1261 | + else | |
1262 | + { | |
1263 | + for (yy = y; yy < y + h; yy++) | |
1264 | + { | |
1265 | + for (xx = x; xx < x + w; xx++) | |
1266 | + { | |
1267 | + SETPIXEL(frameBuffer, xx, yy, c); | |
1268 | + } | |
1269 | + } | |
1270 | + } | |
1271 | + | |
1272 | + rfbMarkRectAsModified(s, x, y, x + w, y + h); | |
1273 | +} | |
1274 | + | |
1275 | +vncBuffer * | |
1276 | +vncGetRect(rfbScreenInfoPtr s, int x, int y, int w, int h) | |
1277 | +{ | |
1278 | + int xx, yy; | |
1279 | + vncBuffer *b = vncNewBuffer(w, h, s->serverFormat.depth); | |
1280 | + | |
1281 | + vncHideCursor(); | |
1282 | + | |
1283 | + if (s->serverFormat.bitsPerPixel == 8) | |
1284 | + { | |
1285 | + //simple copy | |
1286 | + int srcstep, dststep; | |
1287 | + char *srcdata, *dstdata; | |
1288 | + srcstep = s->paddedWidthInBytes * s->serverFormat.bitsPerPixel / 8; | |
1289 | + dststep = w * s->serverFormat.bitsPerPixel / 8; | |
1290 | + dstdata = b->data; | |
1291 | + srcdata = s->frameBuffer + (y * srcstep + x * s->serverFormat.bitsPerPixel / 8); | |
1292 | + for (yy = 0; yy < h; yy++) | |
1293 | + { | |
1294 | + memcpy(dstdata, srcdata, dststep); | |
1295 | + dstdata += dststep; | |
1296 | + srcdata += srcstep; | |
1297 | + } | |
1298 | + } | |
1299 | + else | |
1300 | + { | |
1301 | + for (yy = y; yy < y + h; yy++) | |
1302 | + { | |
1303 | + for (xx = x; xx < x + w; xx++) | |
1304 | + { | |
1305 | + SETPIXEL(b, xx - x, yy - y, GETPIXEL(frameBuffer, xx, yy)); | |
1306 | + } | |
1307 | + } | |
1308 | + } | |
1309 | + | |
1310 | + return b; | |
1311 | +} | |
1312 | + | |
1313 | +/* colourmap */ | |
1314 | + | |
1315 | +rfbColourMap * | |
1316 | +vncNewColourMap(rfbScreenInfoPtr s, int n) | |
1317 | +{ | |
1318 | + rfbColourMap *m = (rfbColourMap *) xmalloc(sizeof(rfbColourMap)); | |
1319 | + m->is16 = FALSE; | |
1320 | + m->count = n; | |
1321 | + m->data.bytes = (uint8_t *) xmalloc(n * 3); | |
1322 | + return m; | |
1323 | +} | |
1324 | + | |
1325 | +void | |
1326 | +vncSetColourMapEntry(rfbColourMap * m, int i, vncPixel r, vncPixel g, vncPixel b) | |
1327 | +{ | |
1328 | + if (i < m->count) | |
1329 | + { | |
1330 | + m->data.bytes[3 * i + 0] = r; | |
1331 | + m->data.bytes[3 * i + 1] = g; | |
1332 | + m->data.bytes[3 * i + 2] = b; | |
1333 | + } | |
1334 | +} | |
1335 | + | |
1336 | +void | |
1337 | +vncDeleteColourMap(rfbColourMap * m) | |
1338 | +{ | |
1339 | + if (m->data.bytes) | |
1340 | + free(m->data.bytes); | |
1341 | + m->count = 0; | |
1342 | +} | |
1343 | + | |
1344 | +void | |
1345 | +vncSetColourMap(rfbScreenInfoPtr s, rfbColourMap * m) | |
1346 | +{ | |
1347 | + vncDeleteColourMap(&s->colourMap); | |
1348 | + s->colourMap = *m; | |
1349 | + rfbSetClientColourMaps(s, 0, 0); | |
1350 | +} | |
1351 | + | |
1352 | +void | |
1353 | +ui_begin_update() | |
1354 | +{ | |
1355 | +} | |
1356 | + | |
1357 | +void | |
1358 | +ui_end_update() | |
1359 | +{ | |
1360 | +} | |
1361 | + | |
1362 | +void | |
1363 | +ui_resize_window() | |
1364 | +{ | |
1365 | + rfbClientIteratorPtr iter; | |
1366 | + rfbClientPtr cl; | |
1367 | + | |
1368 | + server->width = g_width; | |
1369 | + server->height = g_height; | |
1370 | + server->frameBuffer = (char *) realloc(server->frameBuffer, g_width * g_height); | |
1371 | + server->paddedWidthInBytes = g_width; | |
1372 | + | |
1373 | + iter = rfbGetClientIterator(server); | |
1374 | + while ((cl = rfbClientIteratorNext(iter))) | |
1375 | + if (cl->useNewFBSize) | |
1376 | + cl->newFBSizePending = TRUE; | |
1377 | + else | |
1378 | + rfbLog("Warning: Client %s does not support NewFBSize!\n ", cl->host); | |
1379 | + rfbReleaseClientIterator(iter); | |
1380 | +} | |
1381 | diff -urN rdesktop-1.5.0.org/vnc/vnc.h rdesktop-1.5.0/vnc/vnc.h | |
1382 | --- rdesktop-1.5.0.org/vnc/vnc.h 1970-01-01 01:00:00.000000000 +0100 | |
1383 | +++ rdesktop-1.5.0/vnc/vnc.h 2003-02-20 13:17:04.000000000 +0100 | |
1384 | @@ -0,0 +1,68 @@ | |
1385 | +#ifndef VNC_H | |
1386 | +#define VNC_H | |
1387 | + | |
1388 | +#define BOOL rfb_BOOL | |
1389 | +#include <rfb/rfb.h> | |
1390 | +#undef BOOL | |
1391 | + | |
1392 | +typedef unsigned int vncPixel; | |
1393 | + | |
1394 | +typedef struct | |
1395 | +{ | |
1396 | + uint16_t w, h; | |
1397 | + uint16_t linew; | |
1398 | + rfbPixelFormat *format; | |
1399 | + char *data; | |
1400 | + BOOL owner; | |
1401 | +} | |
1402 | +vncBuffer; | |
1403 | + | |
1404 | +extern int vncPreparedClientSocket; | |
1405 | +extern int vncPreparedServerSocket; | |
1406 | + | |
1407 | +/* - Buffer management */ | |
1408 | +extern vncBuffer *vncNewBuffer(int w, int h, int depth); | |
1409 | +extern vncBuffer *vncDupBuffer(vncBuffer * b); | |
1410 | +extern void vncDeleteBuffer(vncBuffer * b); | |
1411 | + | |
1412 | +/* - Colourmaps */ | |
1413 | +typedef struct | |
1414 | +{ | |
1415 | + uint8_t r, g, b; | |
1416 | +} | |
1417 | +vncColour; | |
1418 | + | |
1419 | +extern void vncSetColourMap(rfbScreenInfoPtr s, rfbColourMap * m); | |
1420 | +extern rfbColourMap *vncNewColourMap(rfbScreenInfoPtr s, int n); | |
1421 | +extern void vncSetColourMapEntry(rfbColourMap * m, int i, vncPixel r, vncPixel g, vncPixel b); | |
1422 | +extern void vncDeleteColourMap(rfbColourMap * m); | |
1423 | + | |
1424 | +/* - Simple pixel manipulation */ | |
1425 | +extern vncPixel vncGetPixel(vncBuffer * b, int x, int y); | |
1426 | +extern void vncSetPixel(vncBuffer * b, int x, int y, vncPixel c); | |
1427 | + | |
1428 | +/* - Drawing primitives */ | |
1429 | +extern void vncSetRect(rfbScreenInfoPtr s, int x, int y, int w, int h, vncPixel c); | |
1430 | +extern void vncCopyBlit(rfbScreenInfoPtr s, int x, int y, int w, int h, int srcx, int srcy); | |
1431 | +extern void vncCopyBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1432 | + vncBuffer * b, int srcx, int srcy); | |
1433 | +extern void vncTransBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1434 | + vncBuffer * b, int srcx, int srcy, int bg); | |
1435 | +extern void vncXorBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1436 | + vncBuffer * b, int srcx, int srcy); | |
1437 | +extern void vncAndBlitFrom(rfbScreenInfoPtr s, int x, int y, int w, int h, | |
1438 | + vncBuffer * b, int srcx, int srcy); | |
1439 | +extern vncBuffer *vncGetRect(rfbScreenInfoPtr s, int x, int y, int w, int h); | |
1440 | + | |
1441 | +// - Low level VNC update primitives upon which the rest are based | |
1442 | +extern void vncQueueCopyRect(rfbScreenInfoPtr s, int x, int y, int w, int h, int src_x, int src_y); | |
1443 | +extern void vncQueueUpdate(rfbScreenInfoPtr s, int x, int y, int w, int h); | |
1444 | + | |
1445 | +/* cursor */ | |
1446 | +extern rfbCursorPtr vncNewCursor(vncBuffer * mask, vncBuffer * pointer, int hotx, int hoty); | |
1447 | +extern void vncSetCursor(rfbScreenInfoPtr s, rfbCursorPtr c); | |
1448 | + | |
1449 | +int vncListenAtTcpAddr(unsigned short port); | |
1450 | +void vncPrintStats(); | |
1451 | + | |
1452 | +#endif | |
1453 | diff -urN rdesktop-1.5.0.org/vnc/x11stubs.c rdesktop-1.5.0/vnc/x11stubs.c | |
1454 | --- rdesktop-1.5.0.org/vnc/x11stubs.c 1970-01-01 01:00:00.000000000 +0100 | |
1455 | +++ rdesktop-1.5.0/vnc/x11stubs.c 2003-02-20 13:14:13.000000000 +0100 | |
1456 | @@ -0,0 +1,1405 @@ | |
1457 | +/* | |
1458 | + | |
1459 | +This file fakes some of X11's key handling for the special purpose of running | |
1460 | +a standalone rdp2vnc (without linking to X11) | |
1461 | + | |
1462 | +*/ | |
1463 | + | |
1464 | +#include "x11stubs.h" | |
1465 | +#include <string.h> | |
1466 | + | |
1467 | +/* ignored */ | |
1468 | +int *display; | |
1469 | + | |
1470 | +typedef struct | |
1471 | +{ | |
1472 | + const char *string; | |
1473 | + KeySym keysym; | |
1474 | +} | |
1475 | +StringToKeysym_t; | |
1476 | + | |
1477 | +StringToKeysym_t StringToKeysym[] = { | |
1478 | +#ifndef KEYSYMFAKE_H | |
1479 | + {"VoidSymbol", XK_VoidSymbol}, | |
1480 | +#ifdef XK_MISCELLANY | |
1481 | + {"BackSpace", XK_BackSpace}, | |
1482 | + {"Tab", XK_Tab}, | |
1483 | + {"Linefeed", XK_Linefeed}, | |
1484 | + {"Clear", XK_Clear}, | |
1485 | + {"Return", XK_Return}, | |
1486 | + {"Pause", XK_Pause}, | |
1487 | + {"Scroll_Lock", XK_Scroll_Lock}, | |
1488 | + {"Sys_Req", XK_Sys_Req}, | |
1489 | + {"Escape", XK_Escape}, | |
1490 | + {"Delete", XK_Delete}, | |
1491 | + {"Multi_key", XK_Multi_key}, | |
1492 | + {"SingleCandidate", XK_SingleCandidate}, | |
1493 | + {"MultipleCandidate", XK_MultipleCandidate}, | |
1494 | + {"PreviousCandidate", XK_PreviousCandidate}, | |
1495 | + {"Kanji", XK_Kanji}, | |
1496 | + {"Muhenkan", XK_Muhenkan}, | |
1497 | + {"Henkan_Mode", XK_Henkan_Mode}, | |
1498 | + {"Henkan", XK_Henkan}, | |
1499 | + {"Romaji", XK_Romaji}, | |
1500 | + {"Hiragana", XK_Hiragana}, | |
1501 | + {"Katakana", XK_Katakana}, | |
1502 | + {"Hiragana_Katakana", XK_Hiragana_Katakana}, | |
1503 | + {"Zenkaku", XK_Zenkaku}, | |
1504 | + {"Hankaku", XK_Hankaku}, | |
1505 | + {"Zenkaku_Hankaku", XK_Zenkaku_Hankaku}, | |
1506 | + {"Touroku", XK_Touroku}, | |
1507 | + {"Massyo", XK_Massyo}, | |
1508 | + {"Kana_Lock", XK_Kana_Lock}, | |
1509 | + {"Kana_Shift", XK_Kana_Shift}, | |
1510 | + {"Eisu_Shift", XK_Eisu_Shift}, | |
1511 | + {"Eisu_toggle", XK_Eisu_toggle}, | |
1512 | + {"Zen_Koho", XK_Zen_Koho}, | |
1513 | + {"Mae_Koho", XK_Mae_Koho}, | |
1514 | + {"Home", XK_Home}, | |
1515 | + {"Left", XK_Left}, | |
1516 | + {"Up", XK_Up}, | |
1517 | + {"Right", XK_Right}, | |
1518 | + {"Down", XK_Down}, | |
1519 | + {"Prior", XK_Prior}, | |
1520 | + {"Page_Up", XK_Page_Up}, | |
1521 | + {"Next", XK_Next}, | |
1522 | + {"Page_Down", XK_Page_Down}, | |
1523 | + {"End", XK_End}, | |
1524 | + {"Begin", XK_Begin}, | |
1525 | + {"Select", XK_Select}, | |
1526 | + {"Print", XK_Print}, | |
1527 | + {"Execute", XK_Execute}, | |
1528 | + {"Insert", XK_Insert}, | |
1529 | + {"Undo", XK_Undo}, | |
1530 | + {"Redo", XK_Redo}, | |
1531 | + {"Menu", XK_Menu}, | |
1532 | + {"Find", XK_Find}, | |
1533 | + {"Cancel", XK_Cancel}, | |
1534 | + {"Help", XK_Help}, | |
1535 | + {"Break", XK_Break}, | |
1536 | + {"Mode_switch", XK_Mode_switch}, | |
1537 | + {"script_switch", XK_script_switch}, | |
1538 | + {"Num_Lock", XK_Num_Lock}, | |
1539 | + {"KP_Space", XK_KP_Space}, | |
1540 | + {"KP_Tab", XK_KP_Tab}, | |
1541 | + {"KP_Enter", XK_KP_Enter}, | |
1542 | + {"KP_F1", XK_KP_F1}, | |
1543 | + {"KP_F2", XK_KP_F2}, | |
1544 | + {"KP_F3", XK_KP_F3}, | |
1545 | + {"KP_F4", XK_KP_F4}, | |
1546 | + {"KP_Home", XK_KP_Home}, | |
1547 | + {"KP_Left", XK_KP_Left}, | |
1548 | + {"KP_Up", XK_KP_Up}, | |
1549 | + {"KP_Right", XK_KP_Right}, | |
1550 | + {"KP_Down", XK_KP_Down}, | |
1551 | + {"KP_Prior", XK_KP_Prior}, | |
1552 | + {"KP_Page_Up", XK_KP_Page_Up}, | |
1553 | + {"KP_Next", XK_KP_Next}, | |
1554 | + {"KP_Page_Down", XK_KP_Page_Down}, | |
1555 | + {"KP_End", XK_KP_End}, | |
1556 | + {"KP_Begin", XK_KP_Begin}, | |
1557 | + {"KP_Insert", XK_KP_Insert}, | |
1558 | + {"KP_Delete", XK_KP_Delete}, | |
1559 | + {"KP_Equal", XK_KP_Equal}, | |
1560 | + {"KP_Multiply", XK_KP_Multiply}, | |
1561 | + {"KP_Add", XK_KP_Add}, | |
1562 | + {"KP_Separator", XK_KP_Separator}, | |
1563 | + {"KP_Subtract", XK_KP_Subtract}, | |
1564 | + {"KP_Decimal", XK_KP_Decimal}, | |
1565 | + {"KP_Divide", XK_KP_Divide}, | |
1566 | + {"KP_0", XK_KP_0}, | |
1567 | + {"KP_1", XK_KP_1}, | |
1568 | + {"KP_2", XK_KP_2}, | |
1569 | + {"KP_3", XK_KP_3}, | |
1570 | + {"KP_4", XK_KP_4}, | |
1571 | + {"KP_5", XK_KP_5}, | |
1572 | + {"KP_6", XK_KP_6}, | |
1573 | + {"KP_7", XK_KP_7}, | |
1574 | + {"KP_8", XK_KP_8}, | |
1575 | + {"KP_9", XK_KP_9}, | |
1576 | + {"F1", XK_F1}, | |
1577 | + {"F2", XK_F2}, | |
1578 | + {"F3", XK_F3}, | |
1579 | + {"F4", XK_F4}, | |
1580 | + {"F5", XK_F5}, | |
1581 | + {"F6", XK_F6}, | |
1582 | + {"F7", XK_F7}, | |
1583 | + {"F8", XK_F8}, | |
1584 | + {"F9", XK_F9}, | |
1585 | + {"F10", XK_F10}, | |
1586 | + {"F11", XK_F11}, | |
1587 | + {"L1", XK_L1}, | |
1588 | + {"F12", XK_F12}, | |
1589 | + {"L2", XK_L2}, | |
1590 | + {"F13", XK_F13}, | |
1591 | + {"L3", XK_L3}, | |
1592 | + {"F14", XK_F14}, | |
1593 | + {"L4", XK_L4}, | |
1594 | + {"F15", XK_F15}, | |
1595 | + {"L5", XK_L5}, | |
1596 | + {"F16", XK_F16}, | |
1597 | + {"L6", XK_L6}, | |
1598 | + {"F17", XK_F17}, | |
1599 | + {"L7", XK_L7}, | |
1600 | + {"F18", XK_F18}, | |
1601 | + {"L8", XK_L8}, | |
1602 | + {"F19", XK_F19}, | |
1603 | + {"L9", XK_L9}, | |
1604 | + {"F20", XK_F20}, | |
1605 | + {"L10", XK_L10}, | |
1606 | + {"F21", XK_F21}, | |
1607 | + {"R1", XK_R1}, | |
1608 | + {"F22", XK_F22}, | |
1609 | + {"R2", XK_R2}, | |
1610 | + {"F23", XK_F23}, | |
1611 | + {"R3", XK_R3}, | |
1612 | + {"F24", XK_F24}, | |
1613 | + {"R4", XK_R4}, | |
1614 | + {"F25", XK_F25}, | |
1615 | + {"R5", XK_R5}, | |
1616 | + {"F26", XK_F26}, | |
1617 | + {"R6", XK_R6}, | |
1618 | + {"F27", XK_F27}, | |
1619 | + {"R7", XK_R7}, | |
1620 | + {"F28", XK_F28}, | |
1621 | + {"R8", XK_R8}, | |
1622 | + {"F29", XK_F29}, | |
1623 | + {"R9", XK_R9}, | |
1624 | + {"F30", XK_F30}, | |
1625 | + {"R10", XK_R10}, | |
1626 | + {"F31", XK_F31}, | |
1627 | + {"R11", XK_R11}, | |
1628 | + {"F32", XK_F32}, | |
1629 | + {"R12", XK_R12}, | |
1630 | + {"F33", XK_F33}, | |
1631 | + {"R13", XK_R13}, | |
1632 | + {"F34", XK_F34}, | |
1633 | + {"R14", XK_R14}, | |
1634 | + {"F35", XK_F35}, | |
1635 | + {"R15", XK_R15}, | |
1636 | + {"Shift_L", XK_Shift_L}, | |
1637 | + {"Shift_R", XK_Shift_R}, | |
1638 | + {"Control_L", XK_Control_L}, | |
1639 | + {"Control_R", XK_Control_R}, | |
1640 | + {"Caps_Lock", XK_Caps_Lock}, | |
1641 | + {"Shift_Lock", XK_Shift_Lock}, | |
1642 | + {"Meta_L", XK_Meta_L}, | |
1643 | + {"Meta_R", XK_Meta_R}, | |
1644 | + {"Alt_L", XK_Alt_L}, | |
1645 | + {"Alt_R", XK_Alt_R}, | |
1646 | + {"Super_L", XK_Super_L}, | |
1647 | + {"Super_R", XK_Super_R}, | |
1648 | + {"Hyper_L", XK_Hyper_L}, | |
1649 | + {"Hyper_R", XK_Hyper_R}, | |
1650 | +#endif /* XK_MISCELLANY */ | |
1651 | +#ifdef XK_XKB_KEYS | |
1652 | + {"ISO_Lock", XK_ISO_Lock}, | |
1653 | + {"ISO_Level2_Latch", XK_ISO_Level2_Latch}, | |
1654 | + {"ISO_Level3_Shift", XK_ISO_Level3_Shift}, | |
1655 | + {"ISO_Level3_Latch", XK_ISO_Level3_Latch}, | |
1656 | + {"ISO_Level3_Lock", XK_ISO_Level3_Lock}, | |
1657 | + {"ISO_Group_Shift", XK_ISO_Group_Shift}, | |
1658 | + {"ISO_Group_Latch", XK_ISO_Group_Latch}, | |
1659 | + {"ISO_Group_Lock", XK_ISO_Group_Lock}, | |
1660 | + {"ISO_Next_Group", XK_ISO_Next_Group}, | |
1661 | + {"ISO_Next_Group_Lock", XK_ISO_Next_Group_Lock}, | |
1662 | + {"ISO_Prev_Group", XK_ISO_Prev_Group}, | |
1663 | + {"ISO_Prev_Group_Lock", XK_ISO_Prev_Group_Lock}, | |
1664 | + {"ISO_First_Group", XK_ISO_First_Group}, | |
1665 | + {"ISO_First_Group_Lock", XK_ISO_First_Group_Lock}, | |
1666 | + {"ISO_Last_Group", XK_ISO_Last_Group}, | |
1667 | + {"ISO_Last_Group_Lock", XK_ISO_Last_Group_Lock}, | |
1668 | + {"ISO_Left_Tab", XK_ISO_Left_Tab}, | |
1669 | + {"ISO_Move_Line_Up", XK_ISO_Move_Line_Up}, | |
1670 | + {"ISO_Move_Line_Down", XK_ISO_Move_Line_Down}, | |
1671 | + {"ISO_Partial_Line_Up", XK_ISO_Partial_Line_Up}, | |
1672 | + {"ISO_Partial_Line_Down", XK_ISO_Partial_Line_Down}, | |
1673 | + {"ISO_Partial_Space_Left", XK_ISO_Partial_Space_Left}, | |
1674 | + {"ISO_Partial_Space_Right", XK_ISO_Partial_Space_Right}, | |
1675 | + {"ISO_Set_Margin_Left", XK_ISO_Set_Margin_Left}, | |
1676 | + {"ISO_Set_Margin_Right", XK_ISO_Set_Margin_Right}, | |
1677 | + {"ISO_Release_Margin_Left", XK_ISO_Release_Margin_Left}, | |
1678 | + {"ISO_Release_Margin_Right", XK_ISO_Release_Margin_Right}, | |
1679 | + {"ISO_Release_Both_Margins", XK_ISO_Release_Both_Margins}, | |
1680 | + {"ISO_Fast_Cursor_Left", XK_ISO_Fast_Cursor_Left}, | |
1681 | + {"ISO_Fast_Cursor_Right", XK_ISO_Fast_Cursor_Right}, | |
1682 | + {"ISO_Fast_Cursor_Up", XK_ISO_Fast_Cursor_Up}, | |
1683 | + {"ISO_Fast_Cursor_Down", XK_ISO_Fast_Cursor_Down}, | |
1684 | + {"ISO_Continuous_Underline", XK_ISO_Continuous_Underline}, | |
1685 | + {"ISO_Discontinuous_Underline", XK_ISO_Discontinuous_Underline}, | |
1686 | + {"ISO_Emphasize", XK_ISO_Emphasize}, | |
1687 | + {"ISO_Center_Object", XK_ISO_Center_Object}, | |
1688 | + {"ISO_Enter", XK_ISO_Enter}, | |
1689 | + {"dead_grave", XK_dead_grave}, | |
1690 | + {"dead_acute", XK_dead_acute}, | |
1691 | + {"dead_circumflex", XK_dead_circumflex}, | |
1692 | + {"dead_tilde", XK_dead_tilde}, | |
1693 | + {"dead_macron", XK_dead_macron}, | |
1694 | + {"dead_breve", XK_dead_breve}, | |
1695 | + {"dead_abovedot", XK_dead_abovedot}, | |
1696 | + {"dead_diaeresis", XK_dead_diaeresis}, | |
1697 | + {"dead_abovering", XK_dead_abovering}, | |
1698 | + {"dead_doubleacute", XK_dead_doubleacute}, | |
1699 | + {"dead_caron", XK_dead_caron}, | |
1700 | + {"dead_cedilla", XK_dead_cedilla}, | |
1701 | + {"dead_ogonek", XK_dead_ogonek}, | |
1702 | + {"dead_iota", XK_dead_iota}, | |
1703 | + {"dead_voiced_sound", XK_dead_voiced_sound}, | |
1704 | + {"dead_semivoiced_sound", XK_dead_semivoiced_sound}, | |
1705 | + {"dead_belowdot", XK_dead_belowdot}, | |
1706 | + {"First_Virtual_Screen", XK_First_Virtual_Screen}, | |
1707 | + {"Prev_Virtual_Screen", XK_Prev_Virtual_Screen}, | |
1708 | + {"Next_Virtual_Screen", XK_Next_Virtual_Screen}, | |
1709 | + {"Last_Virtual_Screen", XK_Last_Virtual_Screen}, | |
1710 | + {"Terminate_Server", XK_Terminate_Server}, | |
1711 | + {"AccessX_Enable", XK_AccessX_Enable}, | |
1712 | + {"AccessX_Feedback_Enable", XK_AccessX_Feedback_Enable}, | |
1713 | + {"RepeatKeys_Enable", XK_RepeatKeys_Enable}, | |
1714 | + {"SlowKeys_Enable", XK_SlowKeys_Enable}, | |
1715 | + {"BounceKeys_Enable", XK_BounceKeys_Enable}, | |
1716 | + {"StickyKeys_Enable", XK_StickyKeys_Enable}, | |
1717 | + {"MouseKeys_Enable", XK_MouseKeys_Enable}, | |
1718 | + {"MouseKeys_Accel_Enable", XK_MouseKeys_Accel_Enable}, | |
1719 | + {"Overlay1_Enable", XK_Overlay1_Enable}, | |
1720 | + {"Overlay2_Enable", XK_Overlay2_Enable}, | |
1721 | + {"AudibleBell_Enable", XK_AudibleBell_Enable}, | |
1722 | + {"Pointer_Left", XK_Pointer_Left}, | |
1723 | + {"Pointer_Right", XK_Pointer_Right}, | |
1724 | + {"Pointer_Up", XK_Pointer_Up}, | |
1725 | + {"Pointer_Down", XK_Pointer_Down}, | |
1726 | + {"Pointer_UpLeft", XK_Pointer_UpLeft}, | |
1727 | + {"Pointer_UpRight", XK_Pointer_UpRight}, | |
1728 | + {"Pointer_DownLeft", XK_Pointer_DownLeft}, | |
1729 | + {"Pointer_DownRight", XK_Pointer_DownRight}, | |
1730 | + {"Pointer_Button_Dflt", XK_Pointer_Button_Dflt}, | |
1731 | + {"Pointer_Button1", XK_Pointer_Button1}, | |
1732 | + {"Pointer_Button2", XK_Pointer_Button2}, | |
1733 | + {"Pointer_Button3", XK_Pointer_Button3}, | |
1734 | + {"Pointer_Button4", XK_Pointer_Button4}, | |
1735 | + {"Pointer_Button5", XK_Pointer_Button5}, | |
1736 | + {"Pointer_DblClick_Dflt", XK_Pointer_DblClick_Dflt}, | |
1737 | + {"Pointer_DblClick1", XK_Pointer_DblClick1}, | |
1738 | + {"Pointer_DblClick2", XK_Pointer_DblClick2}, | |
1739 | + {"Pointer_DblClick3", XK_Pointer_DblClick3}, | |
1740 | + {"Pointer_DblClick4", XK_Pointer_DblClick4}, | |
1741 | + {"Pointer_DblClick5", XK_Pointer_DblClick5}, | |
1742 | + {"Pointer_Drag_Dflt", XK_Pointer_Drag_Dflt}, | |
1743 | + {"Pointer_Drag1", XK_Pointer_Drag1}, | |
1744 | + {"Pointer_Drag2", XK_Pointer_Drag2}, | |
1745 | + {"Pointer_Drag3", XK_Pointer_Drag3}, | |
1746 | + {"Pointer_Drag4", XK_Pointer_Drag4}, | |
1747 | + {"Pointer_Drag5", XK_Pointer_Drag5}, | |
1748 | + {"Pointer_EnableKeys", XK_Pointer_EnableKeys}, | |
1749 | + {"Pointer_Accelerate", XK_Pointer_Accelerate}, | |
1750 | + {"Pointer_DfltBtnNext", XK_Pointer_DfltBtnNext}, | |
1751 | + {"Pointer_DfltBtnPrev", XK_Pointer_DfltBtnPrev}, | |
1752 | +#endif | |
1753 | +#ifdef XK_3270 | |
1754 | + {"3270_Duplicate", XK_3270_Duplicate}, | |
1755 | + {"3270_FieldMark", XK_3270_FieldMark}, | |
1756 | + {"3270_Right2", XK_3270_Right2}, | |
1757 | + {"3270_Left2", XK_3270_Left2}, | |
1758 | + {"3270_BackTab", XK_3270_BackTab}, | |
1759 | + {"3270_EraseEOF", XK_3270_EraseEOF}, | |
1760 | + {"3270_EraseInput", XK_3270_EraseInput}, | |
1761 | + {"3270_Reset", XK_3270_Reset}, | |
1762 | + {"3270_Quit", XK_3270_Quit}, | |
1763 | + {"3270_PA1", XK_3270_PA1}, | |
1764 | + {"3270_PA2", XK_3270_PA2}, | |
1765 | + {"3270_PA3", XK_3270_PA3}, | |
1766 | + {"3270_Test", XK_3270_Test}, | |
1767 | + {"3270_Attn", XK_3270_Attn}, | |
1768 | + {"3270_CursorBlink", XK_3270_CursorBlink}, | |
1769 | + {"3270_AltCursor", XK_3270_AltCursor}, | |
1770 | + {"3270_KeyClick", XK_3270_KeyClick}, | |
1771 | + {"3270_Jump", XK_3270_Jump}, | |
1772 | + {"3270_Ident", XK_3270_Ident}, | |
1773 | + {"3270_Rule", XK_3270_Rule}, | |
1774 | + {"3270_Copy", XK_3270_Copy}, | |
1775 | + {"3270_Play", XK_3270_Play}, | |
1776 | + {"3270_Setup", XK_3270_Setup}, | |
1777 | + {"3270_Record", XK_3270_Record}, | |
1778 | + {"3270_ChangeScreen", XK_3270_ChangeScreen}, | |
1779 | + {"3270_DeleteWord", XK_3270_DeleteWord}, | |
1780 | + {"3270_ExSelect", XK_3270_ExSelect}, | |
1781 | + {"3270_CursorSelect", XK_3270_CursorSelect}, | |
1782 | + {"3270_PrintScreen", XK_3270_PrintScreen}, | |
1783 | + {"3270_Enter", XK_3270_Enter}, | |
1784 | +#endif | |
1785 | +#ifdef XK_LATIN1 | |
1786 | + {"space", XK_space}, | |
1787 | + {"exclam", XK_exclam}, | |
1788 | + {"quotedbl", XK_quotedbl}, | |
1789 | + {"numbersign", XK_numbersign}, | |
1790 | + {"dollar", XK_dollar}, | |
1791 | + {"percent", XK_percent}, | |
1792 | + {"ampersand", XK_ampersand}, | |
1793 | + {"apostrophe", XK_apostrophe}, | |
1794 | + {"quoteright", XK_quoteright}, | |
1795 | + {"parenleft", XK_parenleft}, | |
1796 | + {"parenright", XK_parenright}, | |
1797 | + {"asterisk", XK_asterisk}, | |
1798 | + {"plus", XK_plus}, | |
1799 | + {"comma", XK_comma}, | |
1800 | + {"minus", XK_minus}, | |
1801 | + {"period", XK_period}, | |
1802 | + {"slash", XK_slash}, | |
1803 | + {"0", XK_0}, | |
1804 | + {"1", XK_1}, | |
1805 | + {"2", XK_2}, | |
1806 | + {"3", XK_3}, | |
1807 | + {"4", XK_4}, | |
1808 | + {"5", XK_5}, | |
1809 | + {"6", XK_6}, | |
1810 | + {"7", XK_7}, | |
1811 | + {"8", XK_8}, | |
1812 | + {"9", XK_9}, | |
1813 | + {"colon", XK_colon}, | |
1814 | + {"semicolon", XK_semicolon}, | |
1815 | + {"less", XK_less}, | |
1816 | + {"equal", XK_equal}, | |
1817 | + {"greater", XK_greater}, | |
1818 | + {"question", XK_question}, | |
1819 | + {"at", XK_at}, | |
1820 | + {"A", XK_A}, | |
1821 | + {"B", XK_B}, | |
1822 | + {"C", XK_C}, | |
1823 | + {"D", XK_D}, | |
1824 | + {"E", XK_E}, | |
1825 | + {"F", XK_F}, | |
1826 | + {"G", XK_G}, | |
1827 | + {"H", XK_H}, | |
1828 | + {"I", XK_I}, | |
1829 | + {"J", XK_J}, | |
1830 | + {"K", XK_K}, | |
1831 | + {"L", XK_L}, | |
1832 | + {"M", XK_M}, | |
1833 | + {"N", XK_N}, | |
1834 | + {"O", XK_O}, | |
1835 | + {"P", XK_P}, | |
1836 | + {"Q", XK_Q}, | |
1837 | + {"R", XK_R}, | |
1838 | + {"S", XK_S}, | |
1839 | + {"T", XK_T}, | |
1840 | + {"U", XK_U}, | |
1841 | + {"V", XK_V}, | |
1842 | + {"W", XK_W}, | |
1843 | + {"X", XK_X}, | |
1844 | + {"Y", XK_Y}, | |
1845 | + {"Z", XK_Z}, | |
1846 | + {"bracketleft", XK_bracketleft}, | |
1847 | + {"backslash", XK_backslash}, | |
1848 | + {"bracketright", XK_bracketright}, | |
1849 | + {"asciicircum", XK_asciicircum}, | |
1850 | + {"underscore", XK_underscore}, | |
1851 | + {"grave", XK_grave}, | |
1852 | + {"quoteleft", XK_quoteleft}, | |
1853 | + {"a", XK_a}, | |
1854 | + {"b", XK_b}, | |
1855 | + {"c", XK_c}, | |
1856 | + {"d", XK_d}, | |
1857 | + {"e", XK_e}, | |
1858 | + {"f", XK_f}, | |
1859 | + {"g", XK_g}, | |
1860 | + {"h", XK_h}, | |
1861 | + {"i", XK_i}, | |
1862 | + {"j", XK_j}, | |
1863 | + {"k", XK_k}, | |
1864 | + {"l", XK_l}, | |
1865 | + {"m", XK_m}, | |
1866 | + {"n", XK_n}, | |
1867 | + {"o", XK_o}, | |
1868 | + {"p", XK_p}, | |
1869 | + {"q", XK_q}, | |
1870 | + {"r", XK_r}, | |
1871 | + {"s", XK_s}, | |
1872 | + {"t", XK_t}, | |
1873 | + {"u", XK_u}, | |
1874 | + {"v", XK_v}, | |
1875 | + {"w", XK_w}, | |
1876 | + {"x", XK_x}, | |
1877 | + {"y", XK_y}, | |
1878 | + {"z", XK_z}, | |
1879 | + {"braceleft", XK_braceleft}, | |
1880 | + {"bar", XK_bar}, | |
1881 | + {"braceright", XK_braceright}, | |
1882 | + {"asciitilde", XK_asciitilde}, | |
1883 | + {"nobreakspace", XK_nobreakspace}, | |
1884 | + {"exclamdown", XK_exclamdown}, | |
1885 | + {"cent", XK_cent}, | |
1886 | + {"sterling", XK_sterling}, | |
1887 | + {"currency", XK_currency}, | |
1888 | + {"yen", XK_yen}, | |
1889 | + {"brokenbar", XK_brokenbar}, | |
1890 | + {"section", XK_section}, | |
1891 | + {"diaeresis", XK_diaeresis}, | |
1892 | + {"copyright", XK_copyright}, | |
1893 | + {"ordfeminine", XK_ordfeminine}, | |
1894 | + {"guillemotleft", XK_guillemotleft}, | |
1895 | + {"notsign", XK_notsign}, | |
1896 | + {"hyphen", XK_hyphen}, | |
1897 | + {"registered", XK_registered}, | |
1898 | + {"macron", XK_macron}, | |
1899 | + {"degree", XK_degree}, | |
1900 | + {"plusminus", XK_plusminus}, | |
1901 | + {"twosuperior", XK_twosuperior}, | |
1902 | + {"threesuperior", XK_threesuperior}, | |
1903 | + {"acute", XK_acute}, | |
1904 | + {"mu", XK_mu}, | |
1905 | + {"paragraph", XK_paragraph}, | |
1906 | + {"periodcentered", XK_periodcentered}, | |
1907 | + {"cedilla", XK_cedilla}, | |
1908 | + {"onesuperior", XK_onesuperior}, | |
1909 | + {"masculine", XK_masculine}, | |
1910 | + {"guillemotright", XK_guillemotright}, | |
1911 | + {"onequarter", XK_onequarter}, | |
1912 | + {"onehalf", XK_onehalf}, | |
1913 | + {"threequarters", XK_threequarters}, | |
1914 | + {"questiondown", XK_questiondown}, | |
1915 | + {"Agrave", XK_Agrave}, | |
1916 | + {"Aacute", XK_Aacute}, | |
1917 | + {"Acircumflex", XK_Acircumflex}, | |
1918 | + {"Atilde", XK_Atilde}, | |
1919 | + {"Adiaeresis", XK_Adiaeresis}, | |
1920 | + {"Aring", XK_Aring}, | |
1921 | + {"AE", XK_AE}, | |
1922 | + {"Ccedilla", XK_Ccedilla}, | |
1923 | + {"Egrave", XK_Egrave}, | |
1924 | + {"Eacute", XK_Eacute}, | |
1925 | + {"Ecircumflex", XK_Ecircumflex}, | |
1926 | + {"Ediaeresis", XK_Ediaeresis}, | |
1927 | + {"Igrave", XK_Igrave}, | |
1928 | + {"Iacute", XK_Iacute}, | |
1929 | + {"Icircumflex", XK_Icircumflex}, | |
1930 | + {"Idiaeresis", XK_Idiaeresis}, | |
1931 | + {"ETH", XK_ETH}, | |
1932 | + {"Eth", XK_Eth}, | |
1933 | + {"Ntilde", XK_Ntilde}, | |
1934 | + {"Ograve", XK_Ograve}, | |
1935 | + {"Oacute", XK_Oacute}, | |
1936 | + {"Ocircumflex", XK_Ocircumflex}, | |
1937 | + {"Otilde", XK_Otilde}, | |
1938 | + {"Odiaeresis", XK_Odiaeresis}, | |
1939 | + {"multiply", XK_multiply}, | |
1940 | + {"Ooblique", XK_Ooblique}, | |
1941 | + {"Ugrave", XK_Ugrave}, | |
1942 | + {"Uacute", XK_Uacute}, | |
1943 | + {"Ucircumflex", XK_Ucircumflex}, | |
1944 | + {"Udiaeresis", XK_Udiaeresis}, | |
1945 | + {"Yacute", XK_Yacute}, | |
1946 | + {"THORN", XK_THORN}, | |
1947 | + {"Thorn", XK_Thorn}, | |
1948 | + {"ssharp", XK_ssharp}, | |
1949 | + {"agrave", XK_agrave}, | |
1950 | + {"aacute", XK_aacute}, | |
1951 | + {"acircumflex", XK_acircumflex}, | |
1952 | + {"atilde", XK_atilde}, | |
1953 | + {"adiaeresis", XK_adiaeresis}, | |
1954 | + {"aring", XK_aring}, | |
1955 | + {"ae", XK_ae}, | |
1956 | + {"ccedilla", XK_ccedilla}, | |
1957 | + {"egrave", XK_egrave}, | |
1958 | + {"eacute", XK_eacute}, | |
1959 | + {"ecircumflex", XK_ecircumflex}, | |
1960 | + {"ediaeresis", XK_ediaeresis}, | |
1961 | + {"igrave", XK_igrave}, | |
1962 | + {"iacute", XK_iacute}, | |
1963 | + {"icircumflex", XK_icircumflex}, | |
1964 | + {"idiaeresis", XK_idiaeresis}, | |
1965 | + {"eth", XK_eth}, | |
1966 | + {"ntilde", XK_ntilde}, | |
1967 | + {"ograve", XK_ograve}, | |
1968 | + {"oacute", XK_oacute}, | |
1969 | + {"ocircumflex", XK_ocircumflex}, | |
1970 | + {"otilde", XK_otilde}, | |
1971 | + {"odiaeresis", XK_odiaeresis}, | |
1972 | + {"division", XK_division}, | |
1973 | + {"oslash", XK_oslash}, | |
1974 | + {"ugrave", XK_ugrave}, | |
1975 | + {"uacute", XK_uacute}, | |
1976 | + {"ucircumflex", XK_ucircumflex}, | |
1977 | + {"udiaeresis", XK_udiaeresis}, | |
1978 | + {"yacute", XK_yacute}, | |
1979 | + {"thorn", XK_thorn}, | |
1980 | + {"ydiaeresis", XK_ydiaeresis}, | |
1981 | +#endif /* XK_LATIN1 */ | |
1982 | +#ifdef XK_LATIN2 | |
1983 | + {"Aogonek", XK_Aogonek}, | |
1984 | + {"breve", XK_breve}, | |
1985 | + {"Lstroke", XK_Lstroke}, | |
1986 | + {"Lcaron", XK_Lcaron}, | |
1987 | + {"Sacute", XK_Sacute}, | |
1988 | + {"Scaron", XK_Scaron}, | |
1989 | + {"Scedilla", XK_Scedilla}, | |
1990 | + {"Tcaron", XK_Tcaron}, | |
1991 | + {"Zacute", XK_Zacute}, | |
1992 | + {"Zcaron", XK_Zcaron}, | |
1993 | + {"Zabovedot", XK_Zabovedot}, | |
1994 | + {"aogonek", XK_aogonek}, | |
1995 | + {"ogonek", XK_ogonek}, | |
1996 | + {"lstroke", XK_lstroke}, | |
1997 | + {"lcaron", XK_lcaron}, | |
1998 | + {"sacute", XK_sacute}, | |
1999 | + {"caron", XK_caron}, | |
2000 | + {"scaron", XK_scaron}, | |
2001 | + {"scedilla", XK_scedilla}, | |
2002 | + {"tcaron", XK_tcaron}, | |
2003 | + {"zacute", XK_zacute}, | |
2004 | + {"doubleacute", XK_doubleacute}, | |
2005 | + {"zcaron", XK_zcaron}, | |
2006 | + {"zabovedot", XK_zabovedot}, | |
2007 | + {"Racute", XK_Racute}, | |
2008 | + {"Abreve", XK_Abreve}, | |
2009 | + {"Lacute", XK_Lacute}, | |
2010 | + {"Cacute", XK_Cacute}, | |
2011 | + {"Ccaron", XK_Ccaron}, | |
2012 | + {"Eogonek", XK_Eogonek}, | |
2013 | + {"Ecaron", XK_Ecaron}, | |
2014 | + {"Dcaron", XK_Dcaron}, | |
2015 | + {"Dstroke", XK_Dstroke}, | |
2016 | + {"Nacute", XK_Nacute}, | |
2017 | + {"Ncaron", XK_Ncaron}, | |
2018 | + {"Odoubleacute", XK_Odoubleacute}, | |
2019 | + {"Rcaron", XK_Rcaron}, | |
2020 | + {"Uring", XK_Uring}, | |
2021 | + {"Udoubleacute", XK_Udoubleacute}, | |
2022 | + {"Tcedilla", XK_Tcedilla}, | |
2023 | + {"racute", XK_racute}, | |
2024 | + {"abreve", XK_abreve}, | |
2025 | + {"lacute", XK_lacute}, | |
2026 | + {"cacute", XK_cacute}, | |
2027 | + {"ccaron", XK_ccaron}, | |
2028 | + {"eogonek", XK_eogonek}, | |
2029 | + {"ecaron", XK_ecaron}, | |
2030 | + {"dcaron", XK_dcaron}, | |
2031 | + {"dstroke", XK_dstroke}, | |
2032 | + {"nacute", XK_nacute}, | |
2033 | + {"ncaron", XK_ncaron}, | |
2034 | + {"odoubleacute", XK_odoubleacute}, | |
2035 | + {"udoubleacute", XK_udoubleacute}, | |
2036 | + {"rcaron", XK_rcaron}, | |
2037 | + {"uring", XK_uring}, | |
2038 | + {"tcedilla", XK_tcedilla}, | |
2039 | + {"abovedot", XK_abovedot}, | |
2040 | +#endif /* XK_LATIN2 */ | |
2041 | +#ifdef XK_LATIN3 | |
2042 | + {"Hstroke", XK_Hstroke}, | |
2043 | + {"Hcircumflex", XK_Hcircumflex}, | |
2044 | + {"Iabovedot", XK_Iabovedot}, | |
2045 | + {"Gbreve", XK_Gbreve}, | |
2046 | + {"Jcircumflex", XK_Jcircumflex}, | |
2047 | + {"hstroke", XK_hstroke}, | |
2048 | + {"hcircumflex", XK_hcircumflex}, | |
2049 | + {"idotless", XK_idotless}, | |
2050 | + {"gbreve", XK_gbreve}, | |
2051 | + {"jcircumflex", XK_jcircumflex}, | |
2052 | + {"Cabovedot", XK_Cabovedot}, | |
2053 | + {"Ccircumflex", XK_Ccircumflex}, | |
2054 | + {"Gabovedot", XK_Gabovedot}, | |
2055 | + {"Gcircumflex", XK_Gcircumflex}, | |
2056 | + {"Ubreve", XK_Ubreve}, | |
2057 | + {"Scircumflex", XK_Scircumflex}, | |
2058 | + {"cabovedot", XK_cabovedot}, | |
2059 | + {"ccircumflex", XK_ccircumflex}, | |
2060 | + {"gabovedot", XK_gabovedot}, | |
2061 | + {"gcircumflex", XK_gcircumflex}, | |
2062 | + {"ubreve", XK_ubreve}, | |
2063 | + {"scircumflex", XK_scircumflex}, | |
2064 | +#endif /* XK_LATIN3 */ | |
2065 | +#ifdef XK_LATIN4 | |
2066 | + {"kra", XK_kra}, | |
2067 | + {"kappa", XK_kappa}, | |
2068 | + {"Rcedilla", XK_Rcedilla}, | |
2069 | + {"Itilde", XK_Itilde}, | |
2070 | + {"Lcedilla", XK_Lcedilla}, | |
2071 | + {"Emacron", XK_Emacron}, | |
2072 | + {"Gcedilla", XK_Gcedilla}, | |
2073 | + {"Tslash", XK_Tslash}, | |
2074 | + {"rcedilla", XK_rcedilla}, | |
2075 | + {"itilde", XK_itilde}, | |
2076 | + {"lcedilla", XK_lcedilla}, | |
2077 | + {"emacron", XK_emacron}, | |
2078 | + {"gcedilla", XK_gcedilla}, | |
2079 | + {"tslash", XK_tslash}, | |
2080 | + {"ENG", XK_ENG}, | |
2081 | + {"eng", XK_eng}, | |
2082 | + {"Amacron", XK_Amacron}, | |
2083 | + {"Iogonek", XK_Iogonek}, | |
2084 | + {"Eabovedot", XK_Eabovedot}, | |
2085 | + {"Imacron", XK_Imacron}, | |
2086 | + {"Ncedilla", XK_Ncedilla}, | |
2087 | + {"Omacron", XK_Omacron}, | |
2088 | + {"Kcedilla", XK_Kcedilla}, | |
2089 | + {"Uogonek", XK_Uogonek}, | |
2090 | + {"Utilde", XK_Utilde}, | |
2091 | + {"Umacron", XK_Umacron}, | |
2092 | + {"amacron", XK_amacron}, | |
2093 | + {"iogonek", XK_iogonek}, | |
2094 | + {"eabovedot", XK_eabovedot}, | |
2095 | + {"imacron", XK_imacron}, | |
2096 | + {"ncedilla", XK_ncedilla}, | |
2097 | + {"omacron", XK_omacron}, | |
2098 | + {"kcedilla", XK_kcedilla}, | |
2099 | + {"uogonek", XK_uogonek}, | |
2100 | + {"utilde", XK_utilde}, | |
2101 | + {"umacron", XK_umacron}, | |
2102 | +#endif /* XK_LATIN4 */ | |
2103 | +#ifdef XK_KATAKANA | |
2104 | + {"overline", XK_overline}, | |
2105 | + {"kana_fullstop", XK_kana_fullstop}, | |
2106 | + {"kana_openingbracket", XK_kana_openingbracket}, | |
2107 | + {"kana_closingbracket", XK_kana_closingbracket}, | |
2108 | + {"kana_comma", XK_kana_comma}, | |
2109 | + {"kana_conjunctive", XK_kana_conjunctive}, | |
2110 | + {"kana_middledot", XK_kana_middledot}, | |
2111 | + {"kana_WO", XK_kana_WO}, | |
2112 | + {"kana_a", XK_kana_a}, | |
2113 | + {"kana_i", XK_kana_i}, | |
2114 | + {"kana_u", XK_kana_u}, | |
2115 | + {"kana_e", XK_kana_e}, | |
2116 | + {"kana_o", XK_kana_o}, | |
2117 | + {"kana_ya", XK_kana_ya}, | |
2118 | + {"kana_yu", XK_kana_yu}, | |
2119 | + {"kana_yo", XK_kana_yo}, | |
2120 | + {"kana_tsu", XK_kana_tsu}, | |
2121 | + {"kana_tu", XK_kana_tu}, | |
2122 | + {"prolongedsound", XK_prolongedsound}, | |
2123 | + {"kana_A", XK_kana_A}, | |
2124 | + {"kana_I", XK_kana_I}, | |
2125 | + {"kana_U", XK_kana_U}, | |
2126 | + {"kana_E", XK_kana_E}, | |
2127 | + {"kana_O", XK_kana_O}, | |
2128 | + {"kana_KA", XK_kana_KA}, | |
2129 | + {"kana_KI", XK_kana_KI}, | |
2130 | + {"kana_KU", XK_kana_KU}, | |
2131 | + {"kana_KE", XK_kana_KE}, | |
2132 | + {"kana_KO", XK_kana_KO}, | |
2133 | + {"kana_SA", XK_kana_SA}, | |
2134 | + {"kana_SHI", XK_kana_SHI}, | |
2135 | + {"kana_SU", XK_kana_SU}, | |
2136 | + {"kana_SE", XK_kana_SE}, | |
2137 | + {"kana_SO", XK_kana_SO}, | |
2138 | + {"kana_TA", XK_kana_TA}, | |
2139 | + {"kana_CHI", XK_kana_CHI}, | |
2140 | + {"kana_TI", XK_kana_TI}, | |
2141 | + {"kana_TSU", XK_kana_TSU}, | |
2142 | + {"kana_TU", XK_kana_TU}, | |
2143 | + {"kana_TE", XK_kana_TE}, | |
2144 | + {"kana_TO", XK_kana_TO}, | |
2145 | + {"kana_NA", XK_kana_NA}, | |
2146 | + {"kana_NI", XK_kana_NI}, | |
2147 | + {"kana_NU", XK_kana_NU}, | |
2148 | + {"kana_NE", XK_kana_NE}, | |
2149 | + {"kana_NO", XK_kana_NO}, | |
2150 | + {"kana_HA", XK_kana_HA}, | |
2151 | + {"kana_HI", XK_kana_HI}, | |
2152 | + {"kana_FU", XK_kana_FU}, | |
2153 | + {"kana_HU", XK_kana_HU}, | |
2154 | + {"kana_HE", XK_kana_HE}, | |
2155 | + {"kana_HO", XK_kana_HO}, | |
2156 | + {"kana_MA", XK_kana_MA}, | |
2157 | + {"kana_MI", XK_kana_MI}, | |
2158 | + {"kana_MU", XK_kana_MU}, | |
2159 | + {"kana_ME", XK_kana_ME}, | |
2160 | + {"kana_MO", XK_kana_MO}, | |
2161 | + {"kana_YA", XK_kana_YA}, | |
2162 | + {"kana_YU", XK_kana_YU}, | |
2163 | + {"kana_YO", XK_kana_YO}, | |
2164 | + {"kana_RA", XK_kana_RA}, | |
2165 | + {"kana_RI", XK_kana_RI}, | |
2166 | + {"kana_RU", XK_kana_RU}, | |
2167 | + {"kana_RE", XK_kana_RE}, | |
2168 | + {"kana_RO", XK_kana_RO}, | |
2169 | + {"kana_WA", XK_kana_WA}, | |
2170 | + {"kana_N", XK_kana_N}, | |
2171 | + {"voicedsound", XK_voicedsound}, | |
2172 | + {"semivoicedsound", XK_semivoicedsound}, | |
2173 | + {"kana_switch", XK_kana_switch}, | |
2174 | +#endif /* XK_KATAKANA */ | |
2175 | +#ifdef XK_ARABIC | |
2176 | + {"Arabic_comma", XK_Arabic_comma}, | |
2177 | + {"Arabic_semicolon", XK_Arabic_semicolon}, | |
2178 | + {"Arabic_question_mark", XK_Arabic_question_mark}, | |
2179 | + {"Arabic_hamza", XK_Arabic_hamza}, | |
2180 | + {"Arabic_maddaonalef", XK_Arabic_maddaonalef}, | |
2181 | + {"Arabic_hamzaonalef", XK_Arabic_hamzaonalef}, | |
2182 | + {"Arabic_hamzaonwaw", XK_Arabic_hamzaonwaw}, | |
2183 | + {"Arabic_hamzaunderalef", XK_Arabic_hamzaunderalef}, | |
2184 | + {"Arabic_hamzaonyeh", XK_Arabic_hamzaonyeh}, | |
2185 | + {"Arabic_alef", XK_Arabic_alef}, | |
2186 | + {"Arabic_beh", XK_Arabic_beh}, | |
2187 | + {"Arabic_tehmarbuta", XK_Arabic_tehmarbuta}, | |
2188 | + {"Arabic_teh", XK_Arabic_teh}, | |
2189 | + {"Arabic_theh", XK_Arabic_theh}, | |
2190 | + {"Arabic_jeem", XK_Arabic_jeem}, | |
2191 | + {"Arabic_hah", XK_Arabic_hah}, | |
2192 | + {"Arabic_khah", XK_Arabic_khah}, | |
2193 | + {"Arabic_dal", XK_Arabic_dal}, | |
2194 | + {"Arabic_thal", XK_Arabic_thal}, | |
2195 | + {"Arabic_ra", XK_Arabic_ra}, | |
2196 | + {"Arabic_zain", XK_Arabic_zain}, | |
2197 | + {"Arabic_seen", XK_Arabic_seen}, | |
2198 | + {"Arabic_sheen", XK_Arabic_sheen}, | |
2199 | + {"Arabic_sad", XK_Arabic_sad}, | |
2200 | + {"Arabic_dad", XK_Arabic_dad}, | |
2201 | + {"Arabic_tah", XK_Arabic_tah}, | |
2202 | + {"Arabic_zah", XK_Arabic_zah}, | |
2203 | + {"Arabic_ain", XK_Arabic_ain}, | |
2204 | + {"Arabic_ghain", XK_Arabic_ghain}, | |
2205 | + {"Arabic_tatweel", XK_Arabic_tatweel}, | |
2206 | + {"Arabic_feh", XK_Arabic_feh}, | |
2207 | + {"Arabic_qaf", XK_Arabic_qaf}, | |
2208 | + {"Arabic_kaf", XK_Arabic_kaf}, | |
2209 | + {"Arabic_lam", XK_Arabic_lam}, | |
2210 | + {"Arabic_meem", XK_Arabic_meem}, | |
2211 | + {"Arabic_noon", XK_Arabic_noon}, | |
2212 | + {"Arabic_ha", XK_Arabic_ha}, | |
2213 | + {"Arabic_heh", XK_Arabic_heh}, | |
2214 | + {"Arabic_waw", XK_Arabic_waw}, | |
2215 | + {"Arabic_alefmaksura", XK_Arabic_alefmaksura}, | |
2216 | + {"Arabic_yeh", XK_Arabic_yeh}, | |
2217 | + {"Arabic_fathatan", XK_Arabic_fathatan}, | |
2218 | + {"Arabic_dammatan", XK_Arabic_dammatan}, | |
2219 | + {"Arabic_kasratan", XK_Arabic_kasratan}, | |
2220 | + {"Arabic_fatha", XK_Arabic_fatha}, | |
2221 | + {"Arabic_damma", XK_Arabic_damma}, | |
2222 | + {"Arabic_kasra", XK_Arabic_kasra}, | |
2223 | + {"Arabic_shadda", XK_Arabic_shadda}, | |
2224 | + {"Arabic_sukun", XK_Arabic_sukun}, | |
2225 | + {"Arabic_switch", XK_Arabic_switch}, | |
2226 | +#endif /* XK_ARABIC */ | |
2227 | +#ifdef XK_CYRILLIC | |
2228 | + {"Serbian_dje", XK_Serbian_dje}, | |
2229 | + {"Macedonia_gje", XK_Macedonia_gje}, | |
2230 | + {"Cyrillic_io", XK_Cyrillic_io}, | |
2231 | + {"Ukrainian_ie", XK_Ukrainian_ie}, | |
2232 | + {"Ukranian_je", XK_Ukranian_je}, | |
2233 | + {"Macedonia_dse", XK_Macedonia_dse}, | |
2234 | + {"Ukrainian_i", XK_Ukrainian_i}, | |
2235 | + {"Ukranian_i", XK_Ukranian_i}, | |
2236 | + {"Ukrainian_yi", XK_Ukrainian_yi}, | |
2237 | + {"Ukranian_yi", XK_Ukranian_yi}, | |
2238 | + {"Cyrillic_je", XK_Cyrillic_je}, | |
2239 | + {"Serbian_je", XK_Serbian_je}, | |
2240 | + {"Cyrillic_lje", XK_Cyrillic_lje}, | |
2241 | + {"Serbian_lje", XK_Serbian_lje}, | |
2242 | + {"Cyrillic_nje", XK_Cyrillic_nje}, | |
2243 | + {"Serbian_nje", XK_Serbian_nje}, | |
2244 | + {"Serbian_tshe", XK_Serbian_tshe}, | |
2245 | + {"Macedonia_kje", XK_Macedonia_kje}, | |
2246 | + {"Byelorussian_shortu", XK_Byelorussian_shortu}, | |
2247 | + {"Cyrillic_dzhe", XK_Cyrillic_dzhe}, | |
2248 | + {"Serbian_dze", XK_Serbian_dze}, | |
2249 | + {"numerosign", XK_numerosign}, | |
2250 | + {"Serbian_DJE", XK_Serbian_DJE}, | |
2251 | + {"Macedonia_GJE", XK_Macedonia_GJE}, | |
2252 | + {"Cyrillic_IO", XK_Cyrillic_IO}, | |
2253 | + {"Ukrainian_IE", XK_Ukrainian_IE}, | |
2254 | + {"Ukranian_JE", XK_Ukranian_JE}, | |
2255 | + {"Macedonia_DSE", XK_Macedonia_DSE}, | |
2256 | + {"Ukrainian_I", XK_Ukrainian_I}, | |
2257 | + {"Ukranian_I", XK_Ukranian_I}, | |
2258 | + {"Ukrainian_YI", XK_Ukrainian_YI}, | |
2259 | + {"Ukranian_YI", XK_Ukranian_YI}, | |
2260 | + {"Cyrillic_JE", XK_Cyrillic_JE}, | |
2261 | + {"Serbian_JE", XK_Serbian_JE}, | |
2262 | + {"Cyrillic_LJE", XK_Cyrillic_LJE}, | |
2263 | + {"Serbian_LJE", XK_Serbian_LJE}, | |
2264 | + {"Cyrillic_NJE", XK_Cyrillic_NJE}, | |
2265 | + {"Serbian_NJE", XK_Serbian_NJE}, | |
2266 | + {"Serbian_TSHE", XK_Serbian_TSHE}, | |
2267 | + {"Macedonia_KJE", XK_Macedonia_KJE}, | |
2268 | + {"Byelorussian_SHORTU", XK_Byelorussian_SHORTU}, | |
2269 | + {"Cyrillic_DZHE", XK_Cyrillic_DZHE}, | |
2270 | + {"Serbian_DZE", XK_Serbian_DZE}, | |
2271 | + {"Cyrillic_yu", XK_Cyrillic_yu}, | |
2272 | + {"Cyrillic_a", XK_Cyrillic_a}, | |
2273 | + {"Cyrillic_be", XK_Cyrillic_be}, | |
2274 | + {"Cyrillic_tse", XK_Cyrillic_tse}, | |
2275 | + {"Cyrillic_de", XK_Cyrillic_de}, | |
2276 | + {"Cyrillic_ie", XK_Cyrillic_ie}, | |
2277 | + {"Cyrillic_ef", XK_Cyrillic_ef}, | |
2278 | + {"Cyrillic_ghe", XK_Cyrillic_ghe}, | |
2279 | + {"Cyrillic_ha", XK_Cyrillic_ha}, | |
2280 | + {"Cyrillic_i", XK_Cyrillic_i}, | |
2281 | + {"Cyrillic_shorti", XK_Cyrillic_shorti}, | |
2282 | + {"Cyrillic_ka", XK_Cyrillic_ka}, | |
2283 | + {"Cyrillic_el", XK_Cyrillic_el}, | |
2284 | + {"Cyrillic_em", XK_Cyrillic_em}, | |
2285 | + {"Cyrillic_en", XK_Cyrillic_en}, | |
2286 | + {"Cyrillic_o", XK_Cyrillic_o}, | |
2287 | + {"Cyrillic_pe", XK_Cyrillic_pe}, | |
2288 | + {"Cyrillic_ya", XK_Cyrillic_ya}, | |
2289 | + {"Cyrillic_er", XK_Cyrillic_er}, | |
2290 | + {"Cyrillic_es", XK_Cyrillic_es}, | |
2291 | + {"Cyrillic_te", XK_Cyrillic_te}, | |
2292 | + {"Cyrillic_u", XK_Cyrillic_u}, | |
2293 | + {"Cyrillic_zhe", XK_Cyrillic_zhe}, | |
2294 | + {"Cyrillic_ve", XK_Cyrillic_ve}, | |
2295 | + {"Cyrillic_softsign", XK_Cyrillic_softsign}, | |
2296 | + {"Cyrillic_yeru", XK_Cyrillic_yeru}, | |
2297 | + {"Cyrillic_ze", XK_Cyrillic_ze}, | |
2298 | + {"Cyrillic_sha", XK_Cyrillic_sha}, | |
2299 | + {"Cyrillic_e", XK_Cyrillic_e}, | |
2300 | + {"Cyrillic_shcha", XK_Cyrillic_shcha}, | |
2301 | + {"Cyrillic_che", XK_Cyrillic_che}, | |
2302 | + {"Cyrillic_hardsign", XK_Cyrillic_hardsign}, | |
2303 | + {"Cyrillic_YU", XK_Cyrillic_YU}, | |
2304 | + {"Cyrillic_A", XK_Cyrillic_A}, | |
2305 | + {"Cyrillic_BE", XK_Cyrillic_BE}, | |
2306 | + {"Cyrillic_TSE", XK_Cyrillic_TSE}, | |
2307 | + {"Cyrillic_DE", XK_Cyrillic_DE}, | |
2308 | + {"Cyrillic_IE", XK_Cyrillic_IE}, | |
2309 | + {"Cyrillic_EF", XK_Cyrillic_EF}, | |
2310 | + {"Cyrillic_GHE", XK_Cyrillic_GHE}, | |
2311 | + {"Cyrillic_HA", XK_Cyrillic_HA}, | |
2312 | + {"Cyrillic_I", XK_Cyrillic_I}, | |
2313 | + {"Cyrillic_SHORTI", XK_Cyrillic_SHORTI}, | |
2314 | + {"Cyrillic_KA", XK_Cyrillic_KA}, | |
2315 | + {"Cyrillic_EL", XK_Cyrillic_EL}, | |
2316 | + {"Cyrillic_EM", XK_Cyrillic_EM}, | |
2317 | + {"Cyrillic_EN", XK_Cyrillic_EN}, | |
2318 | + {"Cyrillic_O", XK_Cyrillic_O}, | |
2319 | + {"Cyrillic_PE", XK_Cyrillic_PE}, | |
2320 | + {"Cyrillic_YA", XK_Cyrillic_YA}, | |
2321 | + {"Cyrillic_ER", XK_Cyrillic_ER}, | |
2322 | + {"Cyrillic_ES", XK_Cyrillic_ES}, | |
2323 | + {"Cyrillic_TE", XK_Cyrillic_TE}, | |
2324 | + {"Cyrillic_U", XK_Cyrillic_U}, | |
2325 | + {"Cyrillic_ZHE", XK_Cyrillic_ZHE}, | |
2326 | + {"Cyrillic_VE", XK_Cyrillic_VE}, | |
2327 | + {"Cyrillic_SOFTSIGN", XK_Cyrillic_SOFTSIGN}, | |
2328 | + {"Cyrillic_YERU", XK_Cyrillic_YERU}, | |
2329 | + {"Cyrillic_ZE", XK_Cyrillic_ZE}, | |
2330 | + {"Cyrillic_SHA", XK_Cyrillic_SHA}, | |
2331 | + {"Cyrillic_E", XK_Cyrillic_E}, | |
2332 | + {"Cyrillic_SHCHA", XK_Cyrillic_SHCHA}, | |
2333 | + {"Cyrillic_CHE", XK_Cyrillic_CHE}, | |
2334 | + {"Cyrillic_HARDSIGN", XK_Cyrillic_HARDSIGN}, | |
2335 | +#endif /* XK_CYRILLIC */ | |
2336 | +#ifdef XK_GREEK | |
2337 | + {"Greek_ALPHAaccent", XK_Greek_ALPHAaccent}, | |
2338 | + {"Greek_EPSILONaccent", XK_Greek_EPSILONaccent}, | |
2339 | + {"Greek_ETAaccent", XK_Greek_ETAaccent}, | |
2340 | + {"Greek_IOTAaccent", XK_Greek_IOTAaccent}, | |
2341 | + {"Greek_IOTAdieresis", XK_Greek_IOTAdieresis}, | |
2342 | + {"Greek_OMICRONaccent", XK_Greek_OMICRONaccent}, | |
2343 | + {"Greek_UPSILONaccent", XK_Greek_UPSILONaccent}, | |
2344 | + {"Greek_UPSILONdieresis", XK_Greek_UPSILONdieresis}, | |
2345 | + {"Greek_OMEGAaccent", XK_Greek_OMEGAaccent}, | |
2346 | + {"Greek_accentdieresis", XK_Greek_accentdieresis}, | |
2347 | + {"Greek_horizbar", XK_Greek_horizbar}, | |
2348 | + {"Greek_alphaaccent", XK_Greek_alphaaccent}, | |
2349 | + {"Greek_epsilonaccent", XK_Greek_epsilonaccent}, | |
2350 | + {"Greek_etaaccent", XK_Greek_etaaccent}, | |
2351 | + {"Greek_iotaaccent", XK_Greek_iotaaccent}, | |
2352 | + {"Greek_iotadieresis", XK_Greek_iotadieresis}, | |
2353 | + {"Greek_iotaaccentdieresis", XK_Greek_iotaaccentdieresis}, | |
2354 | + {"Greek_omicronaccent", XK_Greek_omicronaccent}, | |
2355 | + {"Greek_upsilonaccent", XK_Greek_upsilonaccent}, | |
2356 | + {"Greek_upsilondieresis", XK_Greek_upsilondieresis}, | |
2357 | + {"Greek_upsilonaccentdieresis", XK_Greek_upsilonaccentdieresis}, | |
2358 | + {"Greek_omegaaccent", XK_Greek_omegaaccent}, | |
2359 | + {"Greek_ALPHA", XK_Greek_ALPHA}, | |
2360 | + {"Greek_BETA", XK_Greek_BETA}, | |
2361 | + {"Greek_GAMMA", XK_Greek_GAMMA}, | |
2362 | + {"Greek_DELTA", XK_Greek_DELTA}, | |
2363 | + {"Greek_EPSILON", XK_Greek_EPSILON}, | |
2364 | + {"Greek_ZETA", XK_Greek_ZETA}, | |
2365 | + {"Greek_ETA", XK_Greek_ETA}, | |
2366 | + {"Greek_THETA", XK_Greek_THETA}, | |
2367 | + {"Greek_IOTA", XK_Greek_IOTA}, | |
2368 | + {"Greek_KAPPA", XK_Greek_KAPPA}, | |
2369 | + {"Greek_LAMDA", XK_Greek_LAMDA}, | |
2370 | + {"Greek_LAMBDA", XK_Greek_LAMBDA}, | |
2371 | + {"Greek_MU", XK_Greek_MU}, | |
2372 | + {"Greek_NU", XK_Greek_NU}, | |
2373 | + {"Greek_XI", XK_Greek_XI}, | |
2374 | + {"Greek_OMICRON", XK_Greek_OMICRON}, | |
2375 | + {"Greek_PI", XK_Greek_PI}, | |
2376 | + {"Greek_RHO", XK_Greek_RHO}, | |
2377 | + {"Greek_SIGMA", XK_Greek_SIGMA}, | |
2378 | + {"Greek_TAU", XK_Greek_TAU}, | |
2379 | + {"Greek_UPSILON", XK_Greek_UPSILON}, | |
2380 | + {"Greek_PHI", XK_Greek_PHI}, | |
2381 | + {"Greek_CHI", XK_Greek_CHI}, | |
2382 | + {"Greek_PSI", XK_Greek_PSI}, | |
2383 | + {"Greek_OMEGA", XK_Greek_OMEGA}, | |
2384 | + {"Greek_alpha", XK_Greek_alpha}, | |
2385 | + {"Greek_beta", XK_Greek_beta}, | |
2386 | + {"Greek_gamma", XK_Greek_gamma}, | |
2387 | + {"Greek_delta", XK_Greek_delta}, | |
2388 | + {"Greek_epsilon", XK_Greek_epsilon}, | |
2389 | + {"Greek_zeta", XK_Greek_zeta}, | |
2390 | + {"Greek_eta", XK_Greek_eta}, | |
2391 | + {"Greek_theta", XK_Greek_theta}, | |
2392 | + {"Greek_iota", XK_Greek_iota}, | |
2393 | + {"Greek_kappa", XK_Greek_kappa}, | |
2394 | + {"Greek_lamda", XK_Greek_lamda}, | |
2395 | + {"Greek_lambda", XK_Greek_lambda}, | |
2396 | + {"Greek_mu", XK_Greek_mu}, | |
2397 | + {"Greek_nu", XK_Greek_nu}, | |
2398 | + {"Greek_xi", XK_Greek_xi}, | |
2399 | + {"Greek_omicron", XK_Greek_omicron}, | |
2400 | + {"Greek_pi", XK_Greek_pi}, | |
2401 | + {"Greek_rho", XK_Greek_rho}, | |
2402 | + {"Greek_sigma", XK_Greek_sigma}, | |
2403 | + {"Greek_finalsmallsigma", XK_Greek_finalsmallsigma}, | |
2404 | + {"Greek_tau", XK_Greek_tau}, | |
2405 | + {"Greek_upsilon", XK_Greek_upsilon}, | |
2406 | + {"Greek_phi", XK_Greek_phi}, | |
2407 | + {"Greek_chi", XK_Greek_chi}, | |
2408 | + {"Greek_psi", XK_Greek_psi}, | |
2409 | + {"Greek_omega", XK_Greek_omega}, | |
2410 | + {"Greek_switch", XK_Greek_switch}, | |
2411 | +#endif /* XK_GREEK */ | |
2412 | +#ifdef XK_TECHNICAL | |
2413 | + {"leftradical", XK_leftradical}, | |
2414 | + {"topleftradical", XK_topleftradical}, | |
2415 | + {"horizconnector", XK_horizconnector}, | |
2416 | + {"topintegral", XK_topintegral}, | |
2417 | + {"botintegral", XK_botintegral}, | |
2418 | + {"vertconnector", XK_vertconnector}, | |
2419 | + {"topleftsqbracket", XK_topleftsqbracket}, | |
2420 | + {"botleftsqbracket", XK_botleftsqbracket}, | |
2421 | + {"toprightsqbracket", XK_toprightsqbracket}, | |
2422 | + {"botrightsqbracket", XK_botrightsqbracket}, | |
2423 | + {"topleftparens", XK_topleftparens}, | |
2424 | + {"botleftparens", XK_botleftparens}, | |
2425 | + {"toprightparens", XK_toprightparens}, | |
2426 | + {"botrightparens", XK_botrightparens}, | |
2427 | + {"leftmiddlecurlybrace", XK_leftmiddlecurlybrace}, | |
2428 | + {"rightmiddlecurlybrace", XK_rightmiddlecurlybrace}, | |
2429 | + {"topleftsummation", XK_topleftsummation}, | |
2430 | + {"botleftsummation", XK_botleftsummation}, | |
2431 | + {"topvertsummationconnector", XK_topvertsummationconnector}, | |
2432 | + {"botvertsummationconnector", XK_botvertsummationconnector}, | |
2433 | + {"toprightsummation", XK_toprightsummation}, | |
2434 | + {"botrightsummation", XK_botrightsummation}, | |
2435 | + {"rightmiddlesummation", XK_rightmiddlesummation}, | |
2436 | + {"lessthanequal", XK_lessthanequal}, | |
2437 | + {"notequal", XK_notequal}, | |
2438 | + {"greaterthanequal", XK_greaterthanequal}, | |
2439 | + {"integral", XK_integral}, | |
2440 | + {"therefore", XK_therefore}, | |
2441 | + {"variation", XK_variation}, | |
2442 | + {"infinity", XK_infinity}, | |
2443 | + {"nabla", XK_nabla}, | |
2444 | + {"approximate", XK_approximate}, | |
2445 | + {"similarequal", XK_similarequal}, | |
2446 | + {"ifonlyif", XK_ifonlyif}, | |
2447 | + {"implies", XK_implies}, | |
2448 | + {"identical", XK_identical}, | |
2449 | + {"radical", XK_radical}, | |
2450 | + {"includedin", XK_includedin}, | |
2451 | + {"includes", XK_includes}, | |
2452 | + {"intersection", XK_intersection}, | |
2453 | + {"union", XK_union}, | |
2454 | + {"logicaland", XK_logicaland}, | |
2455 | + {"logicalor", XK_logicalor}, | |
2456 | + {"partialderivative", XK_partialderivative}, | |
2457 | + {"function", XK_function}, | |
2458 | + {"leftarrow", XK_leftarrow}, | |
2459 | + {"uparrow", XK_uparrow}, | |
2460 | + {"rightarrow", XK_rightarrow}, | |
2461 | + {"downarrow", XK_downarrow}, | |
2462 | +#endif /* XK_TECHNICAL */ | |
2463 | +#ifdef XK_SPECIAL | |
2464 | + {"blank", XK_blank}, | |
2465 | + {"soliddiamond", XK_soliddiamond}, | |
2466 | + {"checkerboard", XK_checkerboard}, | |
2467 | + {"ht", XK_ht}, | |
2468 | + {"ff", XK_ff}, | |
2469 | + {"cr", XK_cr}, | |
2470 | + {"lf", XK_lf}, | |
2471 | + {"nl", XK_nl}, | |
2472 | + {"vt", XK_vt}, | |
2473 | + {"lowrightcorner", XK_lowrightcorner}, | |
2474 | + {"uprightcorner", XK_uprightcorner}, | |
2475 | + {"upleftcorner", XK_upleftcorner}, | |
2476 | + {"lowleftcorner", XK_lowleftcorner}, | |
2477 | + {"crossinglines", XK_crossinglines}, | |
2478 | + {"horizlinescan1", XK_horizlinescan1}, | |
2479 | + {"horizlinescan3", XK_horizlinescan3}, | |
2480 | + {"horizlinescan5", XK_horizlinescan5}, | |
2481 | + {"horizlinescan7", XK_horizlinescan7}, | |
2482 | + {"horizlinescan9", XK_horizlinescan9}, | |
2483 | + {"leftt", XK_leftt}, | |
2484 | + {"rightt", XK_rightt}, | |
2485 | + {"bott", XK_bott}, | |
2486 | + {"topt", XK_topt}, | |
2487 | + {"vertbar", XK_vertbar}, | |
2488 | +#endif /* XK_SPECIAL */ | |
2489 | +#ifdef XK_PUBLISHING | |
2490 | + {"emspace", XK_emspace}, | |
2491 | + {"enspace", XK_enspace}, | |
2492 | + {"em3space", XK_em3space}, | |
2493 | + {"em4space", XK_em4space}, | |
2494 | + {"digitspace", XK_digitspace}, | |
2495 | + {"punctspace", XK_punctspace}, | |
2496 | + {"thinspace", XK_thinspace}, | |
2497 | + {"hairspace", XK_hairspace}, | |
2498 | + {"emdash", XK_emdash}, | |
2499 | + {"endash", XK_endash}, | |
2500 | + {"signifblank", XK_signifblank}, | |
2501 | + {"ellipsis", XK_ellipsis}, | |
2502 | + {"doubbaselinedot", XK_doubbaselinedot}, | |
2503 | + {"onethird", XK_onethird}, | |
2504 | + {"twothirds", XK_twothirds}, | |
2505 | + {"onefifth", XK_onefifth}, | |
2506 | + {"twofifths", XK_twofifths}, | |
2507 | + {"threefifths", XK_threefifths}, | |
2508 | + {"fourfifths", XK_fourfifths}, | |
2509 | + {"onesixth", XK_onesixth}, | |
2510 | + {"fivesixths", XK_fivesixths}, | |
2511 | + {"careof", XK_careof}, | |
2512 | + {"figdash", XK_figdash}, | |
2513 | + {"leftanglebracket", XK_leftanglebracket}, | |
2514 | + {"decimalpoint", XK_decimalpoint}, | |
2515 | + {"rightanglebracket", XK_rightanglebracket}, | |
2516 | + {"marker", XK_marker}, | |
2517 | + {"oneeighth", XK_oneeighth}, | |
2518 | + {"threeeighths", XK_threeeighths}, | |
2519 | + {"fiveeighths", XK_fiveeighths}, | |
2520 | + {"seveneighths", XK_seveneighths}, | |
2521 | + {"trademark", XK_trademark}, | |
2522 | + {"signaturemark", XK_signaturemark}, | |
2523 | + {"trademarkincircle", XK_trademarkincircle}, | |
2524 | + {"leftopentriangle", XK_leftopentriangle}, | |
2525 | + {"rightopentriangle", XK_rightopentriangle}, | |
2526 | + {"emopencircle", XK_emopencircle}, | |
2527 | + {"emopenrectangle", XK_emopenrectangle}, | |
2528 | + {"leftsinglequotemark", XK_leftsinglequotemark}, | |
2529 | + {"rightsinglequotemark", XK_rightsinglequotemark}, | |
2530 | + {"leftdoublequotemark", XK_leftdoublequotemark}, | |
2531 | + {"rightdoublequotemark", XK_rightdoublequotemark}, | |
2532 | + {"prescription", XK_prescription}, | |
2533 | + {"minutes", XK_minutes}, | |
2534 | + {"seconds", XK_seconds}, | |
2535 | + {"latincross", XK_latincross}, | |
2536 | + {"hexagram", XK_hexagram}, | |
2537 | + {"filledrectbullet", XK_filledrectbullet}, | |
2538 | + {"filledlefttribullet", XK_filledlefttribullet}, | |
2539 | + {"filledrighttribullet", XK_filledrighttribullet}, | |
2540 | + {"emfilledcircle", XK_emfilledcircle}, | |
2541 | + {"emfilledrect", XK_emfilledrect}, | |
2542 | + {"enopencircbullet", XK_enopencircbullet}, | |
2543 | + {"enopensquarebullet", XK_enopensquarebullet}, | |
2544 | + {"openrectbullet", XK_openrectbullet}, | |
2545 | + {"opentribulletup", XK_opentribulletup}, | |
2546 | + {"opentribulletdown", XK_opentribulletdown}, | |
2547 | + {"openstar", XK_openstar}, | |
2548 | + {"enfilledcircbullet", XK_enfilledcircbullet}, | |
2549 | + {"enfilledsqbullet", XK_enfilledsqbullet}, | |
2550 | + {"filledtribulletup", XK_filledtribulletup}, | |
2551 | + {"filledtribulletdown", XK_filledtribulletdown}, | |
2552 | + {"leftpointer", XK_leftpointer}, | |
2553 | + {"rightpointer", XK_rightpointer}, | |
2554 | + {"club", XK_club}, | |
2555 | + {"diamond", XK_diamond}, | |
2556 | + {"heart", XK_heart}, | |
2557 | + {"maltesecross", XK_maltesecross}, | |
2558 | + {"dagger", XK_dagger}, | |
2559 | + {"doubledagger", XK_doubledagger}, | |
2560 | + {"checkmark", XK_checkmark}, | |
2561 | + {"ballotcross", XK_ballotcross}, | |
2562 | + {"musicalsharp", XK_musicalsharp}, | |
2563 | + {"musicalflat", XK_musicalflat}, | |
2564 | + {"malesymbol", XK_malesymbol}, | |
2565 | + {"femalesymbol", XK_femalesymbol}, | |
2566 | + {"telephone", XK_telephone}, | |
2567 | + {"telephonerecorder", XK_telephonerecorder}, | |
2568 | + {"phonographcopyright", XK_phonographcopyright}, | |
2569 | + {"caret", XK_caret}, | |
2570 | + {"singlelowquotemark", XK_singlelowquotemark}, | |
2571 | + {"doublelowquotemark", XK_doublelowquotemark}, | |
2572 | + {"cursor", XK_cursor}, | |
2573 | +#endif /* XK_PUBLISHING */ | |
2574 | +#ifdef XK_APL | |
2575 | + {"leftcaret", XK_leftcaret}, | |
2576 | + {"rightcaret", XK_rightcaret}, | |
2577 | + {"downcaret", XK_downcaret}, | |
2578 | + {"upcaret", XK_upcaret}, | |
2579 | + {"overbar", XK_overbar}, | |
2580 | + {"downtack", XK_downtack}, | |
2581 | + {"upshoe", XK_upshoe}, | |
2582 | + {"downstile", XK_downstile}, | |
2583 | + {"underbar", XK_underbar}, | |
2584 | + {"jot", XK_jot}, | |
2585 | + {"quad", XK_quad}, | |
2586 | + {"uptack", XK_uptack}, | |
2587 | + {"circle", XK_circle}, | |
2588 | + {"upstile", XK_upstile}, | |
2589 | + {"downshoe", XK_downshoe}, | |
2590 | + {"rightshoe", XK_rightshoe}, | |
2591 | + {"leftshoe", XK_leftshoe}, | |
2592 | + {"lefttack", XK_lefttack}, | |
2593 | + {"righttack", XK_righttack}, | |
2594 | +#endif /* XK_APL */ | |
2595 | +#ifdef XK_HEBREW | |
2596 | + {"hebrew_doublelowline", XK_hebrew_doublelowline}, | |
2597 | + {"hebrew_aleph", XK_hebrew_aleph}, | |
2598 | + {"hebrew_bet", XK_hebrew_bet}, | |
2599 | + {"hebrew_beth", XK_hebrew_beth}, | |
2600 | + {"hebrew_gimel", XK_hebrew_gimel}, | |
2601 | + {"hebrew_gimmel", XK_hebrew_gimmel}, | |
2602 | + {"hebrew_dalet", XK_hebrew_dalet}, | |
2603 | + {"hebrew_daleth", XK_hebrew_daleth}, | |
2604 | + {"hebrew_he", XK_hebrew_he}, | |
2605 | + {"hebrew_waw", XK_hebrew_waw}, | |
2606 | + {"hebrew_zain", XK_hebrew_zain}, | |
2607 | + {"hebrew_zayin", XK_hebrew_zayin}, | |
2608 | + {"hebrew_chet", XK_hebrew_chet}, | |
2609 | + {"hebrew_het", XK_hebrew_het}, | |
2610 | + {"hebrew_tet", XK_hebrew_tet}, | |
2611 | + {"hebrew_teth", XK_hebrew_teth}, | |
2612 | + {"hebrew_yod", XK_hebrew_yod}, | |
2613 | + {"hebrew_finalkaph", XK_hebrew_finalkaph}, | |
2614 | + {"hebrew_kaph", XK_hebrew_kaph}, | |
2615 | + {"hebrew_lamed", XK_hebrew_lamed}, | |
2616 | + {"hebrew_finalmem", XK_hebrew_finalmem}, | |
2617 | + {"hebrew_mem", XK_hebrew_mem}, | |
2618 | + {"hebrew_finalnun", XK_hebrew_finalnun}, | |
2619 | + {"hebrew_nun", XK_hebrew_nun}, | |
2620 | + {"hebrew_samech", XK_hebrew_samech}, | |
2621 | + {"hebrew_samekh", XK_hebrew_samekh}, | |
2622 | + {"hebrew_ayin", XK_hebrew_ayin}, | |
2623 | + {"hebrew_finalpe", XK_hebrew_finalpe}, | |
2624 | + {"hebrew_pe", XK_hebrew_pe}, | |
2625 | + {"hebrew_finalzade", XK_hebrew_finalzade}, | |
2626 | + {"hebrew_finalzadi", XK_hebrew_finalzadi}, | |
2627 | + {"hebrew_zade", XK_hebrew_zade}, | |
2628 | + {"hebrew_zadi", XK_hebrew_zadi}, | |
2629 | + {"hebrew_qoph", XK_hebrew_qoph}, | |
2630 | + {"hebrew_kuf", XK_hebrew_kuf}, | |
2631 | + {"hebrew_resh", XK_hebrew_resh}, | |
2632 | + {"hebrew_shin", XK_hebrew_shin}, | |
2633 | + {"hebrew_taw", XK_hebrew_taw}, | |
2634 | + {"hebrew_taf", XK_hebrew_taf}, | |
2635 | + {"Hebrew_switch", XK_Hebrew_switch}, | |
2636 | +#endif /* XK_HEBREW */ | |
2637 | +#ifdef XK_THAI | |
2638 | + {"Thai_kokai", XK_Thai_kokai}, | |
2639 | + {"Thai_khokhai", XK_Thai_khokhai}, | |
2640 | + {"Thai_khokhuat", XK_Thai_khokhuat}, | |
2641 | + {"Thai_khokhwai", XK_Thai_khokhwai}, | |
2642 | + {"Thai_khokhon", XK_Thai_khokhon}, | |
2643 | + {"Thai_khorakhang", XK_Thai_khorakhang}, | |
2644 | + {"Thai_ngongu", XK_Thai_ngongu}, | |
2645 | + {"Thai_chochan", XK_Thai_chochan}, | |
2646 | + {"Thai_choching", XK_Thai_choching}, | |
2647 | + {"Thai_chochang", XK_Thai_chochang}, | |
2648 | + {"Thai_soso", XK_Thai_soso}, | |
2649 | + {"Thai_chochoe", XK_Thai_chochoe}, | |
2650 | + {"Thai_yoying", XK_Thai_yoying}, | |
2651 | + {"Thai_dochada", XK_Thai_dochada}, | |
2652 | + {"Thai_topatak", XK_Thai_topatak}, | |
2653 | + {"Thai_thothan", XK_Thai_thothan}, | |
2654 | + {"Thai_thonangmontho", XK_Thai_thonangmontho}, | |
2655 | + {"Thai_thophuthao", XK_Thai_thophuthao}, | |
2656 | + {"Thai_nonen", XK_Thai_nonen}, | |
2657 | + {"Thai_dodek", XK_Thai_dodek}, | |
2658 | + {"Thai_totao", XK_Thai_totao}, | |
2659 | + {"Thai_thothung", XK_Thai_thothung}, | |
2660 | + {"Thai_thothahan", XK_Thai_thothahan}, | |
2661 | + {"Thai_thothong", XK_Thai_thothong}, | |
2662 | + {"Thai_nonu", XK_Thai_nonu}, | |
2663 | + {"Thai_bobaimai", XK_Thai_bobaimai}, | |
2664 | + {"Thai_popla", XK_Thai_popla}, | |
2665 | + {"Thai_phophung", XK_Thai_phophung}, | |
2666 | + {"Thai_fofa", XK_Thai_fofa}, | |
2667 | + {"Thai_phophan", XK_Thai_phophan}, | |
2668 | + {"Thai_fofan", XK_Thai_fofan}, | |
2669 | + {"Thai_phosamphao", XK_Thai_phosamphao}, | |
2670 | + {"Thai_moma", XK_Thai_moma}, | |
2671 | + {"Thai_yoyak", XK_Thai_yoyak}, | |
2672 | + {"Thai_rorua", XK_Thai_rorua}, | |
2673 | + {"Thai_ru", XK_Thai_ru}, | |
2674 | + {"Thai_loling", XK_Thai_loling}, | |
2675 | + {"Thai_lu", XK_Thai_lu}, | |
2676 | + {"Thai_wowaen", XK_Thai_wowaen}, | |
2677 | + {"Thai_sosala", XK_Thai_sosala}, | |
2678 | + {"Thai_sorusi", XK_Thai_sorusi}, | |
2679 | + {"Thai_sosua", XK_Thai_sosua}, | |
2680 | + {"Thai_hohip", XK_Thai_hohip}, | |
2681 | + {"Thai_lochula", XK_Thai_lochula}, | |
2682 | + {"Thai_oang", XK_Thai_oang}, | |
2683 | + {"Thai_honokhuk", XK_Thai_honokhuk}, | |
2684 | + {"Thai_paiyannoi", XK_Thai_paiyannoi}, | |
2685 | + {"Thai_saraa", XK_Thai_saraa}, | |
2686 | + {"Thai_maihanakat", XK_Thai_maihanakat}, | |
2687 | + {"Thai_saraaa", XK_Thai_saraaa}, | |
2688 | + {"Thai_saraam", XK_Thai_saraam}, | |
2689 | + {"Thai_sarai", XK_Thai_sarai}, | |
2690 | + {"Thai_saraii", XK_Thai_saraii}, | |
2691 | + {"Thai_saraue", XK_Thai_saraue}, | |
2692 | + {"Thai_sarauee", XK_Thai_sarauee}, | |
2693 | + {"Thai_sarau", XK_Thai_sarau}, | |
2694 | + {"Thai_sarauu", XK_Thai_sarauu}, | |
2695 | + {"Thai_phinthu", XK_Thai_phinthu}, | |
2696 | + {"Thai_maihanakat_maitho", XK_Thai_maihanakat_maitho}, | |
2697 | + {"Thai_baht", XK_Thai_baht}, | |
2698 | + {"Thai_sarae", XK_Thai_sarae}, | |
2699 | + {"Thai_saraae", XK_Thai_saraae}, | |
2700 | + {"Thai_sarao", XK_Thai_sarao}, | |
2701 | + {"Thai_saraaimaimuan", XK_Thai_saraaimaimuan}, | |
2702 | + {"Thai_saraaimaimalai", XK_Thai_saraaimaimalai}, | |
2703 | + {"Thai_lakkhangyao", XK_Thai_lakkhangyao}, | |
2704 | + {"Thai_maiyamok", XK_Thai_maiyamok}, | |
2705 | + {"Thai_maitaikhu", XK_Thai_maitaikhu}, | |
2706 | + {"Thai_maiek", XK_Thai_maiek}, | |
2707 | + {"Thai_maitho", XK_Thai_maitho}, | |
2708 | + {"Thai_maitri", XK_Thai_maitri}, | |
2709 | + {"Thai_maichattawa", XK_Thai_maichattawa}, | |
2710 | + {"Thai_thanthakhat", XK_Thai_thanthakhat}, | |
2711 | + {"Thai_nikhahit", XK_Thai_nikhahit}, | |
2712 | + {"Thai_leksun", XK_Thai_leksun}, | |
2713 | + {"Thai_leknung", XK_Thai_leknung}, | |
2714 | + {"Thai_leksong", XK_Thai_leksong}, | |
2715 | + {"Thai_leksam", XK_Thai_leksam}, | |
2716 | + {"Thai_leksi", XK_Thai_leksi}, | |
2717 | + {"Thai_lekha", XK_Thai_lekha}, | |
2718 | + {"Thai_lekhok", XK_Thai_lekhok}, | |
2719 | + {"Thai_lekchet", XK_Thai_lekchet}, | |
2720 | + {"Thai_lekpaet", XK_Thai_lekpaet}, | |
2721 | + {"Thai_lekkao", XK_Thai_lekkao}, | |
2722 | +#endif /* XK_THAI */ | |
2723 | +#ifdef XK_KOREAN | |
2724 | + {"Hangul", XK_Hangul}, | |
2725 | + {"Hangul_Start", XK_Hangul_Start}, | |
2726 | + {"Hangul_End", XK_Hangul_End}, | |
2727 | + {"Hangul_Hanja", XK_Hangul_Hanja}, | |
2728 | + {"Hangul_Jamo", XK_Hangul_Jamo}, | |
2729 | + {"Hangul_Romaja", XK_Hangul_Romaja}, | |
2730 | + {"Hangul_Codeinput", XK_Hangul_Codeinput}, | |
2731 | + {"Hangul_Jeonja", XK_Hangul_Jeonja}, | |
2732 | + {"Hangul_Banja", XK_Hangul_Banja}, | |
2733 | + {"Hangul_PreHanja", XK_Hangul_PreHanja}, | |
2734 | + {"Hangul_PostHanja", XK_Hangul_PostHanja}, | |
2735 | + {"Hangul_SingleCandidate", XK_Hangul_SingleCandidate}, | |
2736 | + {"Hangul_MultipleCandidate", XK_Hangul_MultipleCandidate}, | |
2737 | + {"Hangul_PreviousCandidate", XK_Hangul_PreviousCandidate}, | |
2738 | + {"Hangul_Special", XK_Hangul_Special}, | |
2739 | + {"Hangul_switch", XK_Hangul_switch}, | |
2740 | + {"Hangul_Kiyeog", XK_Hangul_Kiyeog}, | |
2741 | + {"Hangul_SsangKiyeog", XK_Hangul_SsangKiyeog}, | |
2742 | + {"Hangul_KiyeogSios", XK_Hangul_KiyeogSios}, | |
2743 | + {"Hangul_Nieun", XK_Hangul_Nieun}, | |
2744 | + {"Hangul_NieunJieuj", XK_Hangul_NieunJieuj}, | |
2745 | + {"Hangul_NieunHieuh", XK_Hangul_NieunHieuh}, | |
2746 | + {"Hangul_Dikeud", XK_Hangul_Dikeud}, | |
2747 | + {"Hangul_SsangDikeud", XK_Hangul_SsangDikeud}, | |
2748 | + {"Hangul_Rieul", XK_Hangul_Rieul}, | |
2749 | + {"Hangul_RieulKiyeog", XK_Hangul_RieulKiyeog}, | |
2750 | + {"Hangul_RieulMieum", XK_Hangul_RieulMieum}, | |
2751 | + {"Hangul_RieulPieub", XK_Hangul_RieulPieub}, | |
2752 | + {"Hangul_RieulSios", XK_Hangul_RieulSios}, | |
2753 | + {"Hangul_RieulTieut", XK_Hangul_RieulTieut}, | |
2754 | + {"Hangul_RieulPhieuf", XK_Hangul_RieulPhieuf}, | |
2755 | + {"Hangul_RieulHieuh", XK_Hangul_RieulHieuh}, | |
2756 | + {"Hangul_Mieum", XK_Hangul_Mieum}, | |
2757 | + {"Hangul_Pieub", XK_Hangul_Pieub}, | |
2758 | + {"Hangul_SsangPieub", XK_Hangul_SsangPieub}, | |
2759 | + {"Hangul_PieubSios", XK_Hangul_PieubSios}, | |
2760 | + {"Hangul_Sios", XK_Hangul_Sios}, | |
2761 | + {"Hangul_SsangSios", XK_Hangul_SsangSios}, | |
2762 | + {"Hangul_Ieung", XK_Hangul_Ieung}, | |
2763 | + {"Hangul_Jieuj", XK_Hangul_Jieuj}, | |
2764 | + {"Hangul_SsangJieuj", XK_Hangul_SsangJieuj}, | |
2765 | + {"Hangul_Cieuc", XK_Hangul_Cieuc}, | |
2766 | + {"Hangul_Khieuq", XK_Hangul_Khieuq}, | |
2767 | + {"Hangul_Tieut", XK_Hangul_Tieut}, | |
2768 | + {"Hangul_Phieuf", XK_Hangul_Phieuf}, | |
2769 | + {"Hangul_Hieuh", XK_Hangul_Hieuh}, | |
2770 | + {"Hangul_A", XK_Hangul_A}, | |
2771 | + {"Hangul_AE", XK_Hangul_AE}, | |
2772 | + {"Hangul_YA", XK_Hangul_YA}, | |
2773 | + {"Hangul_YAE", XK_Hangul_YAE}, | |
2774 | + {"Hangul_EO", XK_Hangul_EO}, | |
2775 | + {"Hangul_E", XK_Hangul_E}, | |
2776 | + {"Hangul_YEO", XK_Hangul_YEO}, | |
2777 | + {"Hangul_YE", XK_Hangul_YE}, | |
2778 | + {"Hangul_O", XK_Hangul_O}, | |
2779 | + {"Hangul_WA", XK_Hangul_WA}, | |
2780 | + {"Hangul_WAE", XK_Hangul_WAE}, | |
2781 | + {"Hangul_OE", XK_Hangul_OE}, | |
2782 | + {"Hangul_YO", XK_Hangul_YO}, | |
2783 | + {"Hangul_U", XK_Hangul_U}, | |
2784 | + {"Hangul_WEO", XK_Hangul_WEO}, | |
2785 | + {"Hangul_WE", XK_Hangul_WE}, | |
2786 | + {"Hangul_WI", XK_Hangul_WI}, | |
2787 | + {"Hangul_YU", XK_Hangul_YU}, | |
2788 | + {"Hangul_EU", XK_Hangul_EU}, | |
2789 | + {"Hangul_YI", XK_Hangul_YI}, | |
2790 | + {"Hangul_I", XK_Hangul_I}, | |
2791 | + {"Hangul_J_Kiyeog", XK_Hangul_J_Kiyeog}, | |
2792 | + {"Hangul_J_SsangKiyeog", XK_Hangul_J_SsangKiyeog}, | |
2793 | + {"Hangul_J_KiyeogSios", XK_Hangul_J_KiyeogSios}, | |
2794 | + {"Hangul_J_Nieun", XK_Hangul_J_Nieun}, | |
2795 | + {"Hangul_J_NieunJieuj", XK_Hangul_J_NieunJieuj}, | |
2796 | + {"Hangul_J_NieunHieuh", XK_Hangul_J_NieunHieuh}, | |
2797 | + {"Hangul_J_Dikeud", XK_Hangul_J_Dikeud}, | |
2798 | + {"Hangul_J_Rieul", XK_Hangul_J_Rieul}, | |
2799 | + {"Hangul_J_RieulKiyeog", XK_Hangul_J_RieulKiyeog}, | |
2800 | + {"Hangul_J_RieulMieum", XK_Hangul_J_RieulMieum}, | |
2801 | + {"Hangul_J_RieulPieub", XK_Hangul_J_RieulPieub}, | |
2802 | + {"Hangul_J_RieulSios", XK_Hangul_J_RieulSios}, | |
2803 | + {"Hangul_J_RieulTieut", XK_Hangul_J_RieulTieut}, | |
2804 | + {"Hangul_J_RieulPhieuf", XK_Hangul_J_RieulPhieuf}, | |
2805 | + {"Hangul_J_RieulHieuh", XK_Hangul_J_RieulHieuh}, | |
2806 | + {"Hangul_J_Mieum", XK_Hangul_J_Mieum}, | |
2807 | + {"Hangul_J_Pieub", XK_Hangul_J_Pieub}, | |
2808 | + {"Hangul_J_PieubSios", XK_Hangul_J_PieubSios}, | |
2809 | + {"Hangul_J_Sios", XK_Hangul_J_Sios}, | |
2810 | + {"Hangul_J_SsangSios", XK_Hangul_J_SsangSios}, | |
2811 | + {"Hangul_J_Ieung", XK_Hangul_J_Ieung}, | |
2812 | + {"Hangul_J_Jieuj", XK_Hangul_J_Jieuj}, | |
2813 | + {"Hangul_J_Cieuc", XK_Hangul_J_Cieuc}, | |
2814 | + {"Hangul_J_Khieuq", XK_Hangul_J_Khieuq}, | |
2815 | + {"Hangul_J_Tieut", XK_Hangul_J_Tieut}, | |
2816 | + {"Hangul_J_Phieuf", XK_Hangul_J_Phieuf}, | |
2817 | + {"Hangul_J_Hieuh", XK_Hangul_J_Hieuh}, | |
2818 | + {"Hangul_RieulYeorinHieuh", XK_Hangul_RieulYeorinHieuh}, | |
2819 | + {"Hangul_SunkyeongeumMieum", XK_Hangul_SunkyeongeumMieum}, | |
2820 | + {"Hangul_SunkyeongeumPieub", XK_Hangul_SunkyeongeumPieub}, | |
2821 | + {"Hangul_PanSios", XK_Hangul_PanSios}, | |
2822 | + {"Hangul_KkogjiDalrinIeung", XK_Hangul_KkogjiDalrinIeung}, | |
2823 | + {"Hangul_SunkyeongeumPhieuf", XK_Hangul_SunkyeongeumPhieuf}, | |
2824 | + {"Hangul_YeorinHieuh", XK_Hangul_YeorinHieuh}, | |
2825 | + {"Hangul_AraeA", XK_Hangul_AraeA}, | |
2826 | + {"Hangul_AraeAE", XK_Hangul_AraeAE}, | |
2827 | + {"Hangul_J_PanSios", XK_Hangul_J_PanSios}, | |
2828 | + {"Hangul_J_KkogjiDalrinIeung", XK_Hangul_J_KkogjiDalrinIeung}, | |
2829 | + {"Hangul_J_YeorinHieuh", XK_Hangul_J_YeorinHieuh}, | |
2830 | + {"Korean_Won", XK_Korean_Won}, | |
2831 | +#endif /* XK_KOREAN */ | |
2832 | + {"EuroSign", XK_EuroSign}, | |
2833 | +#endif | |
2834 | + {"NoSymbol", NoSymbol} | |
2835 | +}; | |
2836 | + | |
2837 | +KeySym | |
2838 | +XStringToKeysym(const char *str) | |
2839 | +{ | |
2840 | + int i; | |
2841 | + for (i = 0; StringToKeysym[i].keysym != NoSymbol | |
2842 | + && strcmp(StringToKeysym[i].string, str); i++); | |
2843 | + return StringToKeysym[i].keysym; | |
2844 | +} | |
2845 | + | |
2846 | +const char * | |
2847 | +XKeysymToString(KeySym keysym) | |
2848 | +{ | |
2849 | + int i; | |
2850 | + for (i = 0; StringToKeysym[i].keysym != NoSymbol | |
2851 | + && StringToKeysym[i].keysym != keysym; i++); | |
2852 | + return StringToKeysym[i].string; | |
2853 | +} | |
2854 | + | |
2855 | +void | |
2856 | +XDisplayKeycodes(Display * display, int *min_keycode, int *max_keycode) | |
2857 | +{ | |
2858 | + /* VNC keycodes are non-existant */ | |
2859 | + *min_keycode = 0xffff; | |
2860 | + *max_keycode = 0; | |
2861 | +} | |
2862 | diff -urN rdesktop-1.5.0.org/vnc/x11stubs.h rdesktop-1.5.0/vnc/x11stubs.h | |
2863 | --- rdesktop-1.5.0.org/vnc/x11stubs.h 1970-01-01 01:00:00.000000000 +0100 | |
2864 | +++ rdesktop-1.5.0/vnc/x11stubs.h 2004-04-10 11:34:52.000000000 +0200 | |
2865 | @@ -0,0 +1,33 @@ | |
2866 | +#ifndef NOXKEYMAP_H | |
2867 | +#define NOXKEYMAP_H | |
2868 | + | |
2869 | +/* Fake a few X11 calls */ | |
2870 | + | |
2871 | +#define XK_MISCELLANY | |
2872 | +#include <rfb/rfb.h> | |
2873 | +#include <rfb/keysym.h> | |
2874 | + | |
2875 | +#define NoSymbol 0L | |
2876 | +#define ShiftMask (1<<0) | |
2877 | +#define LockMask (1<<1) | |
2878 | +#define ControlMask (1<<2) | |
2879 | +#define Mod1Mask (1<<3) | |
2880 | +#define Mod2Mask (1<<4) | |
2881 | +#define Mod3Mask (1<<5) | |
2882 | +#define Mod4Mask (1<<6) | |
2883 | +#define Mod5Mask (1<<7) | |
2884 | +#define Button1 1 | |
2885 | +#define Button2 2 | |
2886 | +#define Button3 3 | |
2887 | +#define Button4 4 | |
2888 | +#define Button5 5 | |
2889 | + | |
2890 | +typedef int Display; | |
2891 | +typedef int Window; | |
2892 | +typedef rfbKeySym KeySym; | |
2893 | + | |
2894 | +KeySym XStringToKeysym(const char *str); | |
2895 | +const char *XKeysymToString(KeySym keysym); | |
2896 | +void XDisplayKeycodes(Display * display, int *min_keycode, int *max_keycode); | |
2897 | + | |
2898 | +#endif |