OSDN Git Service

Add VC++ Project files for PuTTY DLL without exported functions.
[ffftp/ffftp.git] / putty / UNIX / XKEYSYM.C
1 /*\r
2  * xkeysym.c: mapping from X keysyms to Unicode values\r
3  * \r
4  * The basic idea of this is shamelessly cribbed from xterm. The\r
5  * actual character data is generated from Markus Kuhn's proposed\r
6  * redraft of the X11 keysym mapping table, using the following\r
7  * piece of Perl/sh code:\r
8 \r
9 wget -q -O - http://www.cl.cam.ac.uk/~mgk25/ucs/X11.keysyms | \\r
10 perl -ne '/^(\d+)\s+(\d+)\s+[\d\/]+\s+U\+([\dA-Fa-f]+)/ and' \\r
11       -e '  do { $a{$1 * 256+ $2} = hex $3; };' \\r
12       -e 'END { foreach $i (sort {$a <=> $b} keys %a) {' \\r
13       -e '  printf "    {0x%x, 0x%x},\n", $i, $a{$i} } }' \\r
14       -e 'BEGIN { $a{0x13a4} = 0x20ac }'\r
15 \r
16  * (The BEGIN clause inserts a mapping for the Euro sign which for\r
17  * some reason isn't in the list but xterm supports. *shrug*.)\r
18  */\r
19 \r
20 #include "misc.h"\r
21 \r
22 struct keysym {\r
23     /*\r
24      * Currently nothing in here is above 0xFFFF, so I'll use\r
25      * `unsigned short' to save space.\r
26      */\r
27     unsigned short keysym;\r
28     unsigned short unicode;\r
29 };\r
30 \r
31 static struct keysym keysyms[] = {\r
32     {0x20, 0x20},\r
33     {0x21, 0x21},\r
34     {0x22, 0x22},\r
35     {0x23, 0x23},\r
36     {0x24, 0x24},\r
37     {0x25, 0x25},\r
38     {0x26, 0x26},\r
39     {0x27, 0x27},\r
40     {0x28, 0x28},\r
41     {0x29, 0x29},\r
42     {0x2a, 0x2a},\r
43     {0x2b, 0x2b},\r
44     {0x2c, 0x2c},\r
45     {0x2d, 0x2d},\r
46     {0x2e, 0x2e},\r
47     {0x2f, 0x2f},\r
48     {0x30, 0x30},\r
49     {0x31, 0x31},\r
50     {0x32, 0x32},\r
51     {0x33, 0x33},\r
52     {0x34, 0x34},\r
53     {0x35, 0x35},\r
54     {0x36, 0x36},\r
55     {0x37, 0x37},\r
56     {0x38, 0x38},\r
57     {0x39, 0x39},\r
58     {0x3a, 0x3a},\r
59     {0x3b, 0x3b},\r
60     {0x3c, 0x3c},\r
61     {0x3d, 0x3d},\r
62     {0x3e, 0x3e},\r
63     {0x3f, 0x3f},\r
64     {0x40, 0x40},\r
65     {0x41, 0x41},\r
66     {0x42, 0x42},\r
67     {0x43, 0x43},\r
68     {0x44, 0x44},\r
69     {0x45, 0x45},\r
70     {0x46, 0x46},\r
71     {0x47, 0x47},\r
72     {0x48, 0x48},\r
73     {0x49, 0x49},\r
74     {0x4a, 0x4a},\r
75     {0x4b, 0x4b},\r
76     {0x4c, 0x4c},\r
77     {0x4d, 0x4d},\r
78     {0x4e, 0x4e},\r
79     {0x4f, 0x4f},\r
80     {0x50, 0x50},\r
81     {0x51, 0x51},\r
82     {0x52, 0x52},\r
83     {0x53, 0x53},\r
84     {0x54, 0x54},\r
85     {0x55, 0x55},\r
86     {0x56, 0x56},\r
87     {0x57, 0x57},\r
88     {0x58, 0x58},\r
89     {0x59, 0x59},\r
90     {0x5a, 0x5a},\r
91     {0x5b, 0x5b},\r
92     {0x5c, 0x5c},\r
93     {0x5d, 0x5d},\r
94     {0x5e, 0x5e},\r
95     {0x5f, 0x5f},\r
96     {0x60, 0x60},\r
97     {0x61, 0x61},\r
98     {0x62, 0x62},\r
99     {0x63, 0x63},\r
100     {0x64, 0x64},\r
101     {0x65, 0x65},\r
102     {0x66, 0x66},\r
103     {0x67, 0x67},\r
104     {0x68, 0x68},\r
105     {0x69, 0x69},\r
106     {0x6a, 0x6a},\r
107     {0x6b, 0x6b},\r
108     {0x6c, 0x6c},\r
109     {0x6d, 0x6d},\r
110     {0x6e, 0x6e},\r
111     {0x6f, 0x6f},\r
112     {0x70, 0x70},\r
113     {0x71, 0x71},\r
114     {0x72, 0x72},\r
115     {0x73, 0x73},\r
116     {0x74, 0x74},\r
117     {0x75, 0x75},\r
118     {0x76, 0x76},\r
119     {0x77, 0x77},\r
120     {0x78, 0x78},\r
121     {0x79, 0x79},\r
122     {0x7a, 0x7a},\r
123     {0x7b, 0x7b},\r
124     {0x7c, 0x7c},\r
125     {0x7d, 0x7d},\r
126     {0x7e, 0x7e},\r
127     {0xa0, 0xa0},\r
128     {0xa1, 0xa1},\r
129     {0xa2, 0xa2},\r
130     {0xa3, 0xa3},\r
131     {0xa4, 0xa4},\r
132     {0xa5, 0xa5},\r
133     {0xa6, 0xa6},\r
134     {0xa7, 0xa7},\r
135     {0xa8, 0xa8},\r
136     {0xa9, 0xa9},\r
137     {0xaa, 0xaa},\r
138     {0xab, 0xab},\r
139     {0xac, 0xac},\r
140     {0xad, 0xad},\r
141     {0xae, 0xae},\r
142     {0xaf, 0xaf},\r
143     {0xb0, 0xb0},\r
144     {0xb1, 0xb1},\r
145     {0xb2, 0xb2},\r
146     {0xb3, 0xb3},\r
147     {0xb4, 0xb4},\r
148     {0xb5, 0xb5},\r
149     {0xb6, 0xb6},\r
150     {0xb7, 0xb7},\r
151     {0xb8, 0xb8},\r
152     {0xb9, 0xb9},\r
153     {0xba, 0xba},\r
154     {0xbb, 0xbb},\r
155     {0xbc, 0xbc},\r
156     {0xbd, 0xbd},\r
157     {0xbe, 0xbe},\r
158     {0xbf, 0xbf},\r
159     {0xc0, 0xc0},\r
160     {0xc1, 0xc1},\r
161     {0xc2, 0xc2},\r
162     {0xc3, 0xc3},\r
163     {0xc4, 0xc4},\r
164     {0xc5, 0xc5},\r
165     {0xc6, 0xc6},\r
166     {0xc7, 0xc7},\r
167     {0xc8, 0xc8},\r
168     {0xc9, 0xc9},\r
169     {0xca, 0xca},\r
170     {0xcb, 0xcb},\r
171     {0xcc, 0xcc},\r
172     {0xcd, 0xcd},\r
173     {0xce, 0xce},\r
174     {0xcf, 0xcf},\r
175     {0xd0, 0xd0},\r
176     {0xd1, 0xd1},\r
177     {0xd2, 0xd2},\r
178     {0xd3, 0xd3},\r
179     {0xd4, 0xd4},\r
180     {0xd5, 0xd5},\r
181     {0xd6, 0xd6},\r
182     {0xd7, 0xd7},\r
183     {0xd8, 0xd8},\r
184     {0xd9, 0xd9},\r
185     {0xda, 0xda},\r
186     {0xdb, 0xdb},\r
187     {0xdc, 0xdc},\r
188     {0xdd, 0xdd},\r
189     {0xde, 0xde},\r
190     {0xdf, 0xdf},\r
191     {0xe0, 0xe0},\r
192     {0xe1, 0xe1},\r
193     {0xe2, 0xe2},\r
194     {0xe3, 0xe3},\r
195     {0xe4, 0xe4},\r
196     {0xe5, 0xe5},\r
197     {0xe6, 0xe6},\r
198     {0xe7, 0xe7},\r
199     {0xe8, 0xe8},\r
200     {0xe9, 0xe9},\r
201     {0xea, 0xea},\r
202     {0xeb, 0xeb},\r
203     {0xec, 0xec},\r
204     {0xed, 0xed},\r
205     {0xee, 0xee},\r
206     {0xef, 0xef},\r
207     {0xf0, 0xf0},\r
208     {0xf1, 0xf1},\r
209     {0xf2, 0xf2},\r
210     {0xf3, 0xf3},\r
211     {0xf4, 0xf4},\r
212     {0xf5, 0xf5},\r
213     {0xf6, 0xf6},\r
214     {0xf7, 0xf7},\r
215     {0xf8, 0xf8},\r
216     {0xf9, 0xf9},\r
217     {0xfa, 0xfa},\r
218     {0xfb, 0xfb},\r
219     {0xfc, 0xfc},\r
220     {0xfd, 0xfd},\r
221     {0xfe, 0xfe},\r
222     {0xff, 0xff},\r
223     {0x1a1, 0x104},\r
224     {0x1a2, 0x2d8},\r
225     {0x1a3, 0x141},\r
226     {0x1a5, 0x13d},\r
227     {0x1a6, 0x15a},\r
228     {0x1a9, 0x160},\r
229     {0x1aa, 0x15e},\r
230     {0x1ab, 0x164},\r
231     {0x1ac, 0x179},\r
232     {0x1ae, 0x17d},\r
233     {0x1af, 0x17b},\r
234     {0x1b1, 0x105},\r
235     {0x1b2, 0x2db},\r
236     {0x1b3, 0x142},\r
237     {0x1b5, 0x13e},\r
238     {0x1b6, 0x15b},\r
239     {0x1b7, 0x2c7},\r
240     {0x1b9, 0x161},\r
241     {0x1ba, 0x15f},\r
242     {0x1bb, 0x165},\r
243     {0x1bc, 0x17a},\r
244     {0x1bd, 0x2dd},\r
245     {0x1be, 0x17e},\r
246     {0x1bf, 0x17c},\r
247     {0x1c0, 0x154},\r
248     {0x1c3, 0x102},\r
249     {0x1c5, 0x139},\r
250     {0x1c6, 0x106},\r
251     {0x1c8, 0x10c},\r
252     {0x1ca, 0x118},\r
253     {0x1cc, 0x11a},\r
254     {0x1cf, 0x10e},\r
255     {0x1d0, 0x110},\r
256     {0x1d1, 0x143},\r
257     {0x1d2, 0x147},\r
258     {0x1d5, 0x150},\r
259     {0x1d8, 0x158},\r
260     {0x1d9, 0x16e},\r
261     {0x1db, 0x170},\r
262     {0x1de, 0x162},\r
263     {0x1e0, 0x155},\r
264     {0x1e3, 0x103},\r
265     {0x1e5, 0x13a},\r
266     {0x1e6, 0x107},\r
267     {0x1e8, 0x10d},\r
268     {0x1ea, 0x119},\r
269     {0x1ec, 0x11b},\r
270     {0x1ef, 0x10f},\r
271     {0x1f0, 0x111},\r
272     {0x1f1, 0x144},\r
273     {0x1f2, 0x148},\r
274     {0x1f5, 0x151},\r
275     {0x1f8, 0x159},\r
276     {0x1f9, 0x16f},\r
277     {0x1fb, 0x171},\r
278     {0x1fe, 0x163},\r
279     {0x1ff, 0x2d9},\r
280     {0x2a1, 0x126},\r
281     {0x2a6, 0x124},\r
282     {0x2a9, 0x130},\r
283     {0x2ab, 0x11e},\r
284     {0x2ac, 0x134},\r
285     {0x2b1, 0x127},\r
286     {0x2b6, 0x125},\r
287     {0x2b9, 0x131},\r
288     {0x2bb, 0x11f},\r
289     {0x2bc, 0x135},\r
290     {0x2c5, 0x10a},\r
291     {0x2c6, 0x108},\r
292     {0x2d5, 0x120},\r
293     {0x2d8, 0x11c},\r
294     {0x2dd, 0x16c},\r
295     {0x2de, 0x15c},\r
296     {0x2e5, 0x10b},\r
297     {0x2e6, 0x109},\r
298     {0x2f5, 0x121},\r
299     {0x2f8, 0x11d},\r
300     {0x2fd, 0x16d},\r
301     {0x2fe, 0x15d},\r
302     {0x3a2, 0x138},\r
303     {0x3a3, 0x156},\r
304     {0x3a5, 0x128},\r
305     {0x3a6, 0x13b},\r
306     {0x3aa, 0x112},\r
307     {0x3ab, 0x122},\r
308     {0x3ac, 0x166},\r
309     {0x3b3, 0x157},\r
310     {0x3b5, 0x129},\r
311     {0x3b6, 0x13c},\r
312     {0x3ba, 0x113},\r
313     {0x3bb, 0x123},\r
314     {0x3bc, 0x167},\r
315     {0x3bd, 0x14a},\r
316     {0x3bf, 0x14b},\r
317     {0x3c0, 0x100},\r
318     {0x3c7, 0x12e},\r
319     {0x3cc, 0x116},\r
320     {0x3cf, 0x12a},\r
321     {0x3d1, 0x145},\r
322     {0x3d2, 0x14c},\r
323     {0x3d3, 0x136},\r
324     {0x3d9, 0x172},\r
325     {0x3dd, 0x168},\r
326     {0x3de, 0x16a},\r
327     {0x3e0, 0x101},\r
328     {0x3e7, 0x12f},\r
329     {0x3ec, 0x117},\r
330     {0x3ef, 0x12b},\r
331     {0x3f1, 0x146},\r
332     {0x3f2, 0x14d},\r
333     {0x3f3, 0x137},\r
334     {0x3f9, 0x173},\r
335     {0x3fd, 0x169},\r
336     {0x3fe, 0x16b},\r
337     {0x47e, 0x203e},\r
338     {0x4a1, 0x3002},\r
339     {0x4a2, 0x300c},\r
340     {0x4a3, 0x300d},\r
341     {0x4a4, 0x3001},\r
342     {0x4a5, 0x30fb},\r
343     {0x4a6, 0x30f2},\r
344     {0x4a7, 0x30a1},\r
345     {0x4a8, 0x30a3},\r
346     {0x4a9, 0x30a5},\r
347     {0x4aa, 0x30a7},\r
348     {0x4ab, 0x30a9},\r
349     {0x4ac, 0x30e3},\r
350     {0x4ad, 0x30e5},\r
351     {0x4ae, 0x30e7},\r
352     {0x4af, 0x30c3},\r
353     {0x4b0, 0x30fc},\r
354     {0x4b1, 0x30a2},\r
355     {0x4b2, 0x30a4},\r
356     {0x4b3, 0x30a6},\r
357     {0x4b4, 0x30a8},\r
358     {0x4b5, 0x30aa},\r
359     {0x4b6, 0x30ab},\r
360     {0x4b7, 0x30ad},\r
361     {0x4b8, 0x30af},\r
362     {0x4b9, 0x30b1},\r
363     {0x4ba, 0x30b3},\r
364     {0x4bb, 0x30b5},\r
365     {0x4bc, 0x30b7},\r
366     {0x4bd, 0x30b9},\r
367     {0x4be, 0x30bb},\r
368     {0x4bf, 0x30bd},\r
369     {0x4c0, 0x30bf},\r
370     {0x4c1, 0x30c1},\r
371     {0x4c2, 0x30c4},\r
372     {0x4c3, 0x30c6},\r
373     {0x4c4, 0x30c8},\r
374     {0x4c5, 0x30ca},\r
375     {0x4c6, 0x30cb},\r
376     {0x4c7, 0x30cc},\r
377     {0x4c8, 0x30cd},\r
378     {0x4c9, 0x30ce},\r
379     {0x4ca, 0x30cf},\r
380     {0x4cb, 0x30d2},\r
381     {0x4cc, 0x30d5},\r
382     {0x4cd, 0x30d8},\r
383     {0x4ce, 0x30db},\r
384     {0x4cf, 0x30de},\r
385     {0x4d0, 0x30df},\r
386     {0x4d1, 0x30e0},\r
387     {0x4d2, 0x30e1},\r
388     {0x4d3, 0x30e2},\r
389     {0x4d4, 0x30e4},\r
390     {0x4d5, 0x30e6},\r
391     {0x4d6, 0x30e8},\r
392     {0x4d7, 0x30e9},\r
393     {0x4d8, 0x30ea},\r
394     {0x4d9, 0x30eb},\r
395     {0x4da, 0x30ec},\r
396     {0x4db, 0x30ed},\r
397     {0x4dc, 0x30ef},\r
398     {0x4dd, 0x30f3},\r
399     {0x4de, 0x309b},\r
400     {0x4df, 0x309c},\r
401     {0x5ac, 0x60c},\r
402     {0x5bb, 0x61b},\r
403     {0x5bf, 0x61f},\r
404     {0x5c1, 0x621},\r
405     {0x5c2, 0x622},\r
406     {0x5c3, 0x623},\r
407     {0x5c4, 0x624},\r
408     {0x5c5, 0x625},\r
409     {0x5c6, 0x626},\r
410     {0x5c7, 0x627},\r
411     {0x5c8, 0x628},\r
412     {0x5c9, 0x629},\r
413     {0x5ca, 0x62a},\r
414     {0x5cb, 0x62b},\r
415     {0x5cc, 0x62c},\r
416     {0x5cd, 0x62d},\r
417     {0x5ce, 0x62e},\r
418     {0x5cf, 0x62f},\r
419     {0x5d0, 0x630},\r
420     {0x5d1, 0x631},\r
421     {0x5d2, 0x632},\r
422     {0x5d3, 0x633},\r
423     {0x5d4, 0x634},\r
424     {0x5d5, 0x635},\r
425     {0x5d6, 0x636},\r
426     {0x5d7, 0x637},\r
427     {0x5d8, 0x638},\r
428     {0x5d9, 0x639},\r
429     {0x5da, 0x63a},\r
430     {0x5e0, 0x640},\r
431     {0x5e1, 0x641},\r
432     {0x5e2, 0x642},\r
433     {0x5e3, 0x643},\r
434     {0x5e4, 0x644},\r
435     {0x5e5, 0x645},\r
436     {0x5e6, 0x646},\r
437     {0x5e7, 0x647},\r
438     {0x5e8, 0x648},\r
439     {0x5e9, 0x649},\r
440     {0x5ea, 0x64a},\r
441     {0x5eb, 0x64b},\r
442     {0x5ec, 0x64c},\r
443     {0x5ed, 0x64d},\r
444     {0x5ee, 0x64e},\r
445     {0x5ef, 0x64f},\r
446     {0x5f0, 0x650},\r
447     {0x5f1, 0x651},\r
448     {0x5f2, 0x652},\r
449     {0x6a1, 0x452},\r
450     {0x6a2, 0x453},\r
451     {0x6a3, 0x451},\r
452     {0x6a4, 0x454},\r
453     {0x6a5, 0x455},\r
454     {0x6a6, 0x456},\r
455     {0x6a7, 0x457},\r
456     {0x6a8, 0x458},\r
457     {0x6a9, 0x459},\r
458     {0x6aa, 0x45a},\r
459     {0x6ab, 0x45b},\r
460     {0x6ac, 0x45c},\r
461     {0x6ae, 0x45e},\r
462     {0x6af, 0x45f},\r
463     {0x6b0, 0x2116},\r
464     {0x6b1, 0x402},\r
465     {0x6b2, 0x403},\r
466     {0x6b3, 0x401},\r
467     {0x6b4, 0x404},\r
468     {0x6b5, 0x405},\r
469     {0x6b6, 0x406},\r
470     {0x6b7, 0x407},\r
471     {0x6b8, 0x408},\r
472     {0x6b9, 0x409},\r
473     {0x6ba, 0x40a},\r
474     {0x6bb, 0x40b},\r
475     {0x6bc, 0x40c},\r
476     {0x6be, 0x40e},\r
477     {0x6bf, 0x40f},\r
478     {0x6c0, 0x44e},\r
479     {0x6c1, 0x430},\r
480     {0x6c2, 0x431},\r
481     {0x6c3, 0x446},\r
482     {0x6c4, 0x434},\r
483     {0x6c5, 0x435},\r
484     {0x6c6, 0x444},\r
485     {0x6c7, 0x433},\r
486     {0x6c8, 0x445},\r
487     {0x6c9, 0x438},\r
488     {0x6ca, 0x439},\r
489     {0x6cb, 0x43a},\r
490     {0x6cc, 0x43b},\r
491     {0x6cd, 0x43c},\r
492     {0x6ce, 0x43d},\r
493     {0x6cf, 0x43e},\r
494     {0x6d0, 0x43f},\r
495     {0x6d1, 0x44f},\r
496     {0x6d2, 0x440},\r
497     {0x6d3, 0x441},\r
498     {0x6d4, 0x442},\r
499     {0x6d5, 0x443},\r
500     {0x6d6, 0x436},\r
501     {0x6d7, 0x432},\r
502     {0x6d8, 0x44c},\r
503     {0x6d9, 0x44b},\r
504     {0x6da, 0x437},\r
505     {0x6db, 0x448},\r
506     {0x6dc, 0x44d},\r
507     {0x6dd, 0x449},\r
508     {0x6de, 0x447},\r
509     {0x6df, 0x44a},\r
510     {0x6e0, 0x42e},\r
511     {0x6e1, 0x410},\r
512     {0x6e2, 0x411},\r
513     {0x6e3, 0x426},\r
514     {0x6e4, 0x414},\r
515     {0x6e5, 0x415},\r
516     {0x6e6, 0x424},\r
517     {0x6e7, 0x413},\r
518     {0x6e8, 0x425},\r
519     {0x6e9, 0x418},\r
520     {0x6ea, 0x419},\r
521     {0x6eb, 0x41a},\r
522     {0x6ec, 0x41b},\r
523     {0x6ed, 0x41c},\r
524     {0x6ee, 0x41d},\r
525     {0x6ef, 0x41e},\r
526     {0x6f0, 0x41f},\r
527     {0x6f1, 0x42f},\r
528     {0x6f2, 0x420},\r
529     {0x6f3, 0x421},\r
530     {0x6f4, 0x422},\r
531     {0x6f5, 0x423},\r
532     {0x6f6, 0x416},\r
533     {0x6f7, 0x412},\r
534     {0x6f8, 0x42c},\r
535     {0x6f9, 0x42b},\r
536     {0x6fa, 0x417},\r
537     {0x6fb, 0x428},\r
538     {0x6fc, 0x42d},\r
539     {0x6fd, 0x429},\r
540     {0x6fe, 0x427},\r
541     {0x6ff, 0x42a},\r
542     {0x7a1, 0x386},\r
543     {0x7a2, 0x388},\r
544     {0x7a3, 0x389},\r
545     {0x7a4, 0x38a},\r
546     {0x7a5, 0x3aa},\r
547     {0x7a7, 0x38c},\r
548     {0x7a8, 0x38e},\r
549     {0x7a9, 0x3ab},\r
550     {0x7ab, 0x38f},\r
551     {0x7ae, 0x385},\r
552     {0x7af, 0x2015},\r
553     {0x7b1, 0x3ac},\r
554     {0x7b2, 0x3ad},\r
555     {0x7b3, 0x3ae},\r
556     {0x7b4, 0x3af},\r
557     {0x7b5, 0x3ca},\r
558     {0x7b6, 0x390},\r
559     {0x7b7, 0x3cc},\r
560     {0x7b8, 0x3cd},\r
561     {0x7b9, 0x3cb},\r
562     {0x7ba, 0x3b0},\r
563     {0x7bb, 0x3ce},\r
564     {0x7c1, 0x391},\r
565     {0x7c2, 0x392},\r
566     {0x7c3, 0x393},\r
567     {0x7c4, 0x394},\r
568     {0x7c5, 0x395},\r
569     {0x7c6, 0x396},\r
570     {0x7c7, 0x397},\r
571     {0x7c8, 0x398},\r
572     {0x7c9, 0x399},\r
573     {0x7ca, 0x39a},\r
574     {0x7cb, 0x39b},\r
575     {0x7cc, 0x39c},\r
576     {0x7cd, 0x39d},\r
577     {0x7ce, 0x39e},\r
578     {0x7cf, 0x39f},\r
579     {0x7d0, 0x3a0},\r
580     {0x7d1, 0x3a1},\r
581     {0x7d2, 0x3a3},\r
582     {0x7d4, 0x3a4},\r
583     {0x7d5, 0x3a5},\r
584     {0x7d6, 0x3a6},\r
585     {0x7d7, 0x3a7},\r
586     {0x7d8, 0x3a8},\r
587     {0x7d9, 0x3a9},\r
588     {0x7e1, 0x3b1},\r
589     {0x7e2, 0x3b2},\r
590     {0x7e3, 0x3b3},\r
591     {0x7e4, 0x3b4},\r
592     {0x7e5, 0x3b5},\r
593     {0x7e6, 0x3b6},\r
594     {0x7e7, 0x3b7},\r
595     {0x7e8, 0x3b8},\r
596     {0x7e9, 0x3b9},\r
597     {0x7ea, 0x3ba},\r
598     {0x7eb, 0x3bb},\r
599     {0x7ec, 0x3bc},\r
600     {0x7ed, 0x3bd},\r
601     {0x7ee, 0x3be},\r
602     {0x7ef, 0x3bf},\r
603     {0x7f0, 0x3c0},\r
604     {0x7f1, 0x3c1},\r
605     {0x7f2, 0x3c3},\r
606     {0x7f3, 0x3c2},\r
607     {0x7f4, 0x3c4},\r
608     {0x7f5, 0x3c5},\r
609     {0x7f6, 0x3c6},\r
610     {0x7f7, 0x3c7},\r
611     {0x7f8, 0x3c8},\r
612     {0x7f9, 0x3c9},\r
613     {0x8a1, 0x23b7},\r
614     {0x8a2, 0x250c},\r
615     {0x8a3, 0x2500},\r
616     {0x8a4, 0x2320},\r
617     {0x8a5, 0x2321},\r
618     {0x8a6, 0x2502},\r
619     {0x8a7, 0x23a1},\r
620     {0x8a8, 0x23a3},\r
621     {0x8a9, 0x23a4},\r
622     {0x8aa, 0x23a6},\r
623     {0x8ab, 0x239b},\r
624     {0x8ac, 0x239d},\r
625     {0x8ad, 0x239e},\r
626     {0x8ae, 0x23a0},\r
627     {0x8af, 0x23a8},\r
628     {0x8b0, 0x23ac},\r
629     {0x8bc, 0x2264},\r
630     {0x8bd, 0x2260},\r
631     {0x8be, 0x2265},\r
632     {0x8bf, 0x222b},\r
633     {0x8c0, 0x2234},\r
634     {0x8c1, 0x221d},\r
635     {0x8c2, 0x221e},\r
636     {0x8c5, 0x2207},\r
637     {0x8c8, 0x223c},\r
638     {0x8c9, 0x2243},\r
639     {0x8cd, 0x21d4},\r
640     {0x8ce, 0x21d2},\r
641     {0x8cf, 0x2261},\r
642     {0x8d6, 0x221a},\r
643     {0x8da, 0x2282},\r
644     {0x8db, 0x2283},\r
645     {0x8dc, 0x2229},\r
646     {0x8dd, 0x222a},\r
647     {0x8de, 0x2227},\r
648     {0x8df, 0x2228},\r
649     {0x8ef, 0x2202},\r
650     {0x8f6, 0x192},\r
651     {0x8fb, 0x2190},\r
652     {0x8fc, 0x2191},\r
653     {0x8fd, 0x2192},\r
654     {0x8fe, 0x2193},\r
655     {0x9e0, 0x25c6},\r
656     {0x9e1, 0x2592},\r
657     {0x9e2, 0x2409},\r
658     {0x9e3, 0x240c},\r
659     {0x9e4, 0x240d},\r
660     {0x9e5, 0x240a},\r
661     {0x9e8, 0x2424},\r
662     {0x9e9, 0x240b},\r
663     {0x9ea, 0x2518},\r
664     {0x9eb, 0x2510},\r
665     {0x9ec, 0x250c},\r
666     {0x9ed, 0x2514},\r
667     {0x9ee, 0x253c},\r
668     {0x9ef, 0x23ba},\r
669     {0x9f0, 0x23bb},\r
670     {0x9f1, 0x2500},\r
671     {0x9f2, 0x23bc},\r
672     {0x9f3, 0x23bd},\r
673     {0x9f4, 0x251c},\r
674     {0x9f5, 0x2524},\r
675     {0x9f6, 0x2534},\r
676     {0x9f7, 0x252c},\r
677     {0x9f8, 0x2502},\r
678     {0xaa1, 0x2003},\r
679     {0xaa2, 0x2002},\r
680     {0xaa3, 0x2004},\r
681     {0xaa4, 0x2005},\r
682     {0xaa5, 0x2007},\r
683     {0xaa6, 0x2008},\r
684     {0xaa7, 0x2009},\r
685     {0xaa8, 0x200a},\r
686     {0xaa9, 0x2014},\r
687     {0xaaa, 0x2013},\r
688     {0xaae, 0x2026},\r
689     {0xaaf, 0x2025},\r
690     {0xab0, 0x2153},\r
691     {0xab1, 0x2154},\r
692     {0xab2, 0x2155},\r
693     {0xab3, 0x2156},\r
694     {0xab4, 0x2157},\r
695     {0xab5, 0x2158},\r
696     {0xab6, 0x2159},\r
697     {0xab7, 0x215a},\r
698     {0xab8, 0x2105},\r
699     {0xabb, 0x2012},\r
700     {0xabc, 0x2329},\r
701     {0xabe, 0x232a},\r
702     {0xac3, 0x215b},\r
703     {0xac4, 0x215c},\r
704     {0xac5, 0x215d},\r
705     {0xac6, 0x215e},\r
706     {0xac9, 0x2122},\r
707     {0xaca, 0x2613},\r
708     {0xacc, 0x25c1},\r
709     {0xacd, 0x25b7},\r
710     {0xace, 0x25cb},\r
711     {0xacf, 0x25af},\r
712     {0xad0, 0x2018},\r
713     {0xad1, 0x2019},\r
714     {0xad2, 0x201c},\r
715     {0xad3, 0x201d},\r
716     {0xad4, 0x211e},\r
717     {0xad6, 0x2032},\r
718     {0xad7, 0x2033},\r
719     {0xad9, 0x271d},\r
720     {0xadb, 0x25ac},\r
721     {0xadc, 0x25c0},\r
722     {0xadd, 0x25b6},\r
723     {0xade, 0x25cf},\r
724     {0xadf, 0x25ae},\r
725     {0xae0, 0x25e6},\r
726     {0xae1, 0x25ab},\r
727     {0xae2, 0x25ad},\r
728     {0xae3, 0x25b3},\r
729     {0xae4, 0x25bd},\r
730     {0xae5, 0x2606},\r
731     {0xae6, 0x2022},\r
732     {0xae7, 0x25aa},\r
733     {0xae8, 0x25b2},\r
734     {0xae9, 0x25bc},\r
735     {0xaea, 0x261c},\r
736     {0xaeb, 0x261e},\r
737     {0xaec, 0x2663},\r
738     {0xaed, 0x2666},\r
739     {0xaee, 0x2665},\r
740     {0xaf0, 0x2720},\r
741     {0xaf1, 0x2020},\r
742     {0xaf2, 0x2021},\r
743     {0xaf3, 0x2713},\r
744     {0xaf4, 0x2717},\r
745     {0xaf5, 0x266f},\r
746     {0xaf6, 0x266d},\r
747     {0xaf7, 0x2642},\r
748     {0xaf8, 0x2640},\r
749     {0xaf9, 0x260e},\r
750     {0xafa, 0x2315},\r
751     {0xafb, 0x2117},\r
752     {0xafc, 0x2038},\r
753     {0xafd, 0x201a},\r
754     {0xafe, 0x201e},\r
755     {0xba3, 0x3c},\r
756     {0xba6, 0x3e},\r
757     {0xba8, 0x2228},\r
758     {0xba9, 0x2227},\r
759     {0xbc0, 0xaf},\r
760     {0xbc2, 0x22a5},\r
761     {0xbc3, 0x2229},\r
762     {0xbc4, 0x230a},\r
763     {0xbc6, 0x5f},\r
764     {0xbca, 0x2218},\r
765     {0xbcc, 0x2395},\r
766     {0xbce, 0x22a4},\r
767     {0xbcf, 0x25cb},\r
768     {0xbd3, 0x2308},\r
769     {0xbd6, 0x222a},\r
770     {0xbd8, 0x2283},\r
771     {0xbda, 0x2282},\r
772     {0xbdc, 0x22a2},\r
773     {0xbfc, 0x22a3},\r
774     {0xcdf, 0x2017},\r
775     {0xce0, 0x5d0},\r
776     {0xce1, 0x5d1},\r
777     {0xce2, 0x5d2},\r
778     {0xce3, 0x5d3},\r
779     {0xce4, 0x5d4},\r
780     {0xce5, 0x5d5},\r
781     {0xce6, 0x5d6},\r
782     {0xce7, 0x5d7},\r
783     {0xce8, 0x5d8},\r
784     {0xce9, 0x5d9},\r
785     {0xcea, 0x5da},\r
786     {0xceb, 0x5db},\r
787     {0xcec, 0x5dc},\r
788     {0xced, 0x5dd},\r
789     {0xcee, 0x5de},\r
790     {0xcef, 0x5df},\r
791     {0xcf0, 0x5e0},\r
792     {0xcf1, 0x5e1},\r
793     {0xcf2, 0x5e2},\r
794     {0xcf3, 0x5e3},\r
795     {0xcf4, 0x5e4},\r
796     {0xcf5, 0x5e5},\r
797     {0xcf6, 0x5e6},\r
798     {0xcf7, 0x5e7},\r
799     {0xcf8, 0x5e8},\r
800     {0xcf9, 0x5e9},\r
801     {0xcfa, 0x5ea},\r
802     {0xda1, 0xe01},\r
803     {0xda2, 0xe02},\r
804     {0xda3, 0xe03},\r
805     {0xda4, 0xe04},\r
806     {0xda5, 0xe05},\r
807     {0xda6, 0xe06},\r
808     {0xda7, 0xe07},\r
809     {0xda8, 0xe08},\r
810     {0xda9, 0xe09},\r
811     {0xdaa, 0xe0a},\r
812     {0xdab, 0xe0b},\r
813     {0xdac, 0xe0c},\r
814     {0xdad, 0xe0d},\r
815     {0xdae, 0xe0e},\r
816     {0xdaf, 0xe0f},\r
817     {0xdb0, 0xe10},\r
818     {0xdb1, 0xe11},\r
819     {0xdb2, 0xe12},\r
820     {0xdb3, 0xe13},\r
821     {0xdb4, 0xe14},\r
822     {0xdb5, 0xe15},\r
823     {0xdb6, 0xe16},\r
824     {0xdb7, 0xe17},\r
825     {0xdb8, 0xe18},\r
826     {0xdb9, 0xe19},\r
827     {0xdba, 0xe1a},\r
828     {0xdbb, 0xe1b},\r
829     {0xdbc, 0xe1c},\r
830     {0xdbd, 0xe1d},\r
831     {0xdbe, 0xe1e},\r
832     {0xdbf, 0xe1f},\r
833     {0xdc0, 0xe20},\r
834     {0xdc1, 0xe21},\r
835     {0xdc2, 0xe22},\r
836     {0xdc3, 0xe23},\r
837     {0xdc4, 0xe24},\r
838     {0xdc5, 0xe25},\r
839     {0xdc6, 0xe26},\r
840     {0xdc7, 0xe27},\r
841     {0xdc8, 0xe28},\r
842     {0xdc9, 0xe29},\r
843     {0xdca, 0xe2a},\r
844     {0xdcb, 0xe2b},\r
845     {0xdcc, 0xe2c},\r
846     {0xdcd, 0xe2d},\r
847     {0xdce, 0xe2e},\r
848     {0xdcf, 0xe2f},\r
849     {0xdd0, 0xe30},\r
850     {0xdd1, 0xe31},\r
851     {0xdd2, 0xe32},\r
852     {0xdd3, 0xe33},\r
853     {0xdd4, 0xe34},\r
854     {0xdd5, 0xe35},\r
855     {0xdd6, 0xe36},\r
856     {0xdd7, 0xe37},\r
857     {0xdd8, 0xe38},\r
858     {0xdd9, 0xe39},\r
859     {0xdda, 0xe3a},\r
860     {0xddf, 0xe3f},\r
861     {0xde0, 0xe40},\r
862     {0xde1, 0xe41},\r
863     {0xde2, 0xe42},\r
864     {0xde3, 0xe43},\r
865     {0xde4, 0xe44},\r
866     {0xde5, 0xe45},\r
867     {0xde6, 0xe46},\r
868     {0xde7, 0xe47},\r
869     {0xde8, 0xe48},\r
870     {0xde9, 0xe49},\r
871     {0xdea, 0xe4a},\r
872     {0xdeb, 0xe4b},\r
873     {0xdec, 0xe4c},\r
874     {0xded, 0xe4d},\r
875     {0xdf0, 0xe50},\r
876     {0xdf1, 0xe51},\r
877     {0xdf2, 0xe52},\r
878     {0xdf3, 0xe53},\r
879     {0xdf4, 0xe54},\r
880     {0xdf5, 0xe55},\r
881     {0xdf6, 0xe56},\r
882     {0xdf7, 0xe57},\r
883     {0xdf8, 0xe58},\r
884     {0xdf9, 0xe59},\r
885     {0xea1, 0x3131},\r
886     {0xea2, 0x3132},\r
887     {0xea3, 0x3133},\r
888     {0xea4, 0x3134},\r
889     {0xea5, 0x3135},\r
890     {0xea6, 0x3136},\r
891     {0xea7, 0x3137},\r
892     {0xea8, 0x3138},\r
893     {0xea9, 0x3139},\r
894     {0xeaa, 0x313a},\r
895     {0xeab, 0x313b},\r
896     {0xeac, 0x313c},\r
897     {0xead, 0x313d},\r
898     {0xeae, 0x313e},\r
899     {0xeaf, 0x313f},\r
900     {0xeb0, 0x3140},\r
901     {0xeb1, 0x3141},\r
902     {0xeb2, 0x3142},\r
903     {0xeb3, 0x3143},\r
904     {0xeb4, 0x3144},\r
905     {0xeb5, 0x3145},\r
906     {0xeb6, 0x3146},\r
907     {0xeb7, 0x3147},\r
908     {0xeb8, 0x3148},\r
909     {0xeb9, 0x3149},\r
910     {0xeba, 0x314a},\r
911     {0xebb, 0x314b},\r
912     {0xebc, 0x314c},\r
913     {0xebd, 0x314d},\r
914     {0xebe, 0x314e},\r
915     {0xebf, 0x314f},\r
916     {0xec0, 0x3150},\r
917     {0xec1, 0x3151},\r
918     {0xec2, 0x3152},\r
919     {0xec3, 0x3153},\r
920     {0xec4, 0x3154},\r
921     {0xec5, 0x3155},\r
922     {0xec6, 0x3156},\r
923     {0xec7, 0x3157},\r
924     {0xec8, 0x3158},\r
925     {0xec9, 0x3159},\r
926     {0xeca, 0x315a},\r
927     {0xecb, 0x315b},\r
928     {0xecc, 0x315c},\r
929     {0xecd, 0x315d},\r
930     {0xece, 0x315e},\r
931     {0xecf, 0x315f},\r
932     {0xed0, 0x3160},\r
933     {0xed1, 0x3161},\r
934     {0xed2, 0x3162},\r
935     {0xed3, 0x3163},\r
936     {0xed4, 0x11a8},\r
937     {0xed5, 0x11a9},\r
938     {0xed6, 0x11aa},\r
939     {0xed7, 0x11ab},\r
940     {0xed8, 0x11ac},\r
941     {0xed9, 0x11ad},\r
942     {0xeda, 0x11ae},\r
943     {0xedb, 0x11af},\r
944     {0xedc, 0x11b0},\r
945     {0xedd, 0x11b1},\r
946     {0xede, 0x11b2},\r
947     {0xedf, 0x11b3},\r
948     {0xee0, 0x11b4},\r
949     {0xee1, 0x11b5},\r
950     {0xee2, 0x11b6},\r
951     {0xee3, 0x11b7},\r
952     {0xee4, 0x11b8},\r
953     {0xee5, 0x11b9},\r
954     {0xee6, 0x11ba},\r
955     {0xee7, 0x11bb},\r
956     {0xee8, 0x11bc},\r
957     {0xee9, 0x11bd},\r
958     {0xeea, 0x11be},\r
959     {0xeeb, 0x11bf},\r
960     {0xeec, 0x11c0},\r
961     {0xeed, 0x11c1},\r
962     {0xeee, 0x11c2},\r
963     {0xeef, 0x316d},\r
964     {0xef0, 0x3171},\r
965     {0xef1, 0x3178},\r
966     {0xef2, 0x317f},\r
967     {0xef3, 0x3181},\r
968     {0xef4, 0x3184},\r
969     {0xef5, 0x3186},\r
970     {0xef6, 0x318d},\r
971     {0xef7, 0x318e},\r
972     {0xef8, 0x11eb},\r
973     {0xef9, 0x11f0},\r
974     {0xefa, 0x11f9},\r
975     {0xeff, 0x20a9},\r
976     {0x13a4, 0x20ac},\r
977     {0x13bc, 0x152},\r
978     {0x13bd, 0x153},\r
979     {0x13be, 0x178},\r
980     {0x20a0, 0x20a0},\r
981     {0x20a1, 0x20a1},\r
982     {0x20a2, 0x20a2},\r
983     {0x20a3, 0x20a3},\r
984     {0x20a4, 0x20a4},\r
985     {0x20a5, 0x20a5},\r
986     {0x20a6, 0x20a6},\r
987     {0x20a7, 0x20a7},\r
988     {0x20a8, 0x20a8},\r
989     {0x20aa, 0x20aa},\r
990     {0x20ab, 0x20ab},\r
991     {0x20ac, 0x20ac},\r
992 };\r
993 \r
994 int keysym_to_unicode(int keysym)\r
995 {\r
996     int i, j, k;\r
997 \r
998     i = -1;\r
999     j = lenof(keysyms);\r
1000 \r
1001     while (j - i >= 2) {\r
1002         k = (j + i) / 2;\r
1003         if (keysyms[k].keysym == keysym)\r
1004             return keysyms[k].unicode;\r
1005         else if (keysyms[k].keysym < keysym)\r
1006             i = k;\r
1007         else\r
1008             j = k;\r
1009     }\r
1010     return -1;\r
1011 }\r