1/**************************************************************************/
2/* key_mapping_x11.cpp */
3/**************************************************************************/
4/* This file is part of: */
5/* GODOT ENGINE */
6/* https://godotengine.org */
7/**************************************************************************/
8/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
10/* */
11/* Permission is hereby granted, free of charge, to any person obtaining */
12/* a copy of this software and associated documentation files (the */
13/* "Software"), to deal in the Software without restriction, including */
14/* without limitation the rights to use, copy, modify, merge, publish, */
15/* distribute, sublicense, and/or sell copies of the Software, and to */
16/* permit persons to whom the Software is furnished to do so, subject to */
17/* the following conditions: */
18/* */
19/* The above copyright notice and this permission notice shall be */
20/* included in all copies or substantial portions of the Software. */
21/* */
22/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
25/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29/**************************************************************************/
30
31#include "key_mapping_x11.h"
32
33void KeyMappingX11::initialize() {
34 // X11 Keysym to Godot Key map.
35
36 xkeysym_map[XK_Escape] = Key::ESCAPE;
37 xkeysym_map[XK_Tab] = Key::TAB;
38 xkeysym_map[XK_ISO_Left_Tab] = Key::BACKTAB;
39 xkeysym_map[XK_BackSpace] = Key::BACKSPACE;
40 xkeysym_map[XK_Return] = Key::ENTER;
41 xkeysym_map[XK_Insert] = Key::INSERT;
42 xkeysym_map[XK_Delete] = Key::KEY_DELETE;
43 xkeysym_map[XK_Clear] = Key::KEY_DELETE;
44 xkeysym_map[XK_Pause] = Key::PAUSE;
45 xkeysym_map[XK_Print] = Key::PRINT;
46 xkeysym_map[XK_Home] = Key::HOME;
47 xkeysym_map[XK_End] = Key::END;
48 xkeysym_map[XK_Left] = Key::LEFT;
49 xkeysym_map[XK_Up] = Key::UP;
50 xkeysym_map[XK_Right] = Key::RIGHT;
51 xkeysym_map[XK_Down] = Key::DOWN;
52 xkeysym_map[XK_Prior] = Key::PAGEUP;
53 xkeysym_map[XK_Next] = Key::PAGEDOWN;
54 xkeysym_map[XK_Shift_L] = Key::SHIFT;
55 xkeysym_map[XK_Shift_R] = Key::SHIFT;
56 xkeysym_map[XK_Shift_Lock] = Key::SHIFT;
57 xkeysym_map[XK_Control_L] = Key::CTRL;
58 xkeysym_map[XK_Control_R] = Key::CTRL;
59 xkeysym_map[XK_Meta_L] = Key::META;
60 xkeysym_map[XK_Meta_R] = Key::META;
61 xkeysym_map[XK_Alt_L] = Key::ALT;
62 xkeysym_map[XK_Alt_R] = Key::ALT;
63 xkeysym_map[XK_Caps_Lock] = Key::CAPSLOCK;
64 xkeysym_map[XK_Num_Lock] = Key::NUMLOCK;
65 xkeysym_map[XK_Scroll_Lock] = Key::SCROLLLOCK;
66 xkeysym_map[XK_less] = Key::QUOTELEFT;
67 xkeysym_map[XK_grave] = Key::SECTION;
68 xkeysym_map[XK_Super_L] = Key::META;
69 xkeysym_map[XK_Super_R] = Key::META;
70 xkeysym_map[XK_Menu] = Key::MENU;
71 xkeysym_map[XK_Hyper_L] = Key::HYPER;
72 xkeysym_map[XK_Hyper_R] = Key::HYPER;
73 xkeysym_map[XK_Help] = Key::HELP;
74 xkeysym_map[XK_KP_Space] = Key::SPACE;
75 xkeysym_map[XK_KP_Tab] = Key::TAB;
76 xkeysym_map[XK_KP_Enter] = Key::KP_ENTER;
77 xkeysym_map[XK_Home] = Key::HOME;
78 xkeysym_map[XK_Left] = Key::LEFT;
79 xkeysym_map[XK_Up] = Key::UP;
80 xkeysym_map[XK_Right] = Key::RIGHT;
81 xkeysym_map[XK_Down] = Key::DOWN;
82 xkeysym_map[XK_Prior] = Key::PAGEUP;
83 xkeysym_map[XK_Next] = Key::PAGEDOWN;
84 xkeysym_map[XK_End] = Key::END;
85 xkeysym_map[XK_Begin] = Key::CLEAR;
86 xkeysym_map[XK_Insert] = Key::INSERT;
87 xkeysym_map[XK_Delete] = Key::KEY_DELETE;
88 xkeysym_map[XK_KP_Equal] = Key::EQUAL;
89 xkeysym_map[XK_KP_Separator] = Key::COMMA;
90 xkeysym_map[XK_KP_Decimal] = Key::KP_PERIOD;
91 xkeysym_map[XK_KP_Delete] = Key::KP_PERIOD;
92 xkeysym_map[XK_KP_Multiply] = Key::KP_MULTIPLY;
93 xkeysym_map[XK_KP_Divide] = Key::KP_DIVIDE;
94 xkeysym_map[XK_KP_Subtract] = Key::KP_SUBTRACT;
95 xkeysym_map[XK_KP_Add] = Key::KP_ADD;
96 xkeysym_map[XK_KP_0] = Key::KP_0;
97 xkeysym_map[XK_KP_1] = Key::KP_1;
98 xkeysym_map[XK_KP_2] = Key::KP_2;
99 xkeysym_map[XK_KP_3] = Key::KP_3;
100 xkeysym_map[XK_KP_4] = Key::KP_4;
101 xkeysym_map[XK_KP_5] = Key::KP_5;
102 xkeysym_map[XK_KP_6] = Key::KP_6;
103 xkeysym_map[XK_KP_7] = Key::KP_7;
104 xkeysym_map[XK_KP_8] = Key::KP_8;
105 xkeysym_map[XK_KP_9] = Key::KP_9;
106 // Same keys but with numlock off.
107 xkeysym_map[XK_KP_Insert] = Key::INSERT;
108 xkeysym_map[XK_KP_End] = Key::END;
109 xkeysym_map[XK_KP_Down] = Key::DOWN;
110 xkeysym_map[XK_KP_Page_Down] = Key::PAGEDOWN;
111 xkeysym_map[XK_KP_Left] = Key::LEFT;
112 // X11 documents this (numpad 5) as "begin of line" but no toolkit seems to interpret it this way.
113 // On Windows this is emitting Key::Clear so for consistency it will be mapped to Key::Clear
114 xkeysym_map[XK_KP_Begin] = Key::CLEAR;
115 xkeysym_map[XK_KP_Right] = Key::RIGHT;
116 xkeysym_map[XK_KP_Home] = Key::HOME;
117 xkeysym_map[XK_KP_Up] = Key::UP;
118 xkeysym_map[XK_KP_Page_Up] = Key::PAGEUP;
119 xkeysym_map[XK_F1] = Key::F1;
120 xkeysym_map[XK_F2] = Key::F2;
121 xkeysym_map[XK_F3] = Key::F3;
122 xkeysym_map[XK_F4] = Key::F4;
123 xkeysym_map[XK_F5] = Key::F5;
124 xkeysym_map[XK_F6] = Key::F6;
125 xkeysym_map[XK_F7] = Key::F7;
126 xkeysym_map[XK_F8] = Key::F8;
127 xkeysym_map[XK_F9] = Key::F9;
128 xkeysym_map[XK_F10] = Key::F10;
129 xkeysym_map[XK_F11] = Key::F11;
130 xkeysym_map[XK_F12] = Key::F12;
131 xkeysym_map[XK_F13] = Key::F13;
132 xkeysym_map[XK_F14] = Key::F14;
133 xkeysym_map[XK_F15] = Key::F15;
134 xkeysym_map[XK_F16] = Key::F16;
135 xkeysym_map[XK_F17] = Key::F17;
136 xkeysym_map[XK_F18] = Key::F18;
137 xkeysym_map[XK_F19] = Key::F19;
138 xkeysym_map[XK_F20] = Key::F20;
139 xkeysym_map[XK_F21] = Key::F21;
140 xkeysym_map[XK_F22] = Key::F22;
141 xkeysym_map[XK_F23] = Key::F23;
142 xkeysym_map[XK_F24] = Key::F24;
143 xkeysym_map[XK_F25] = Key::F25;
144 xkeysym_map[XK_F26] = Key::F26;
145 xkeysym_map[XK_F27] = Key::F27;
146 xkeysym_map[XK_F28] = Key::F28;
147 xkeysym_map[XK_F29] = Key::F29;
148 xkeysym_map[XK_F30] = Key::F30;
149 xkeysym_map[XK_F31] = Key::F31;
150 xkeysym_map[XK_F32] = Key::F32;
151 xkeysym_map[XK_F33] = Key::F33;
152 xkeysym_map[XK_F34] = Key::F34;
153 xkeysym_map[XK_F35] = Key::F35;
154 xkeysym_map[XK_yen] = Key::YEN;
155 xkeysym_map[XK_section] = Key::SECTION;
156 // Media keys.
157 xkeysym_map[XF86XK_Back] = Key::BACK;
158 xkeysym_map[XF86XK_Forward] = Key::FORWARD;
159 xkeysym_map[XF86XK_Stop] = Key::STOP;
160 xkeysym_map[XF86XK_Refresh] = Key::REFRESH;
161 xkeysym_map[XF86XK_Favorites] = Key::FAVORITES;
162 xkeysym_map[XF86XK_OpenURL] = Key::OPENURL;
163 xkeysym_map[XF86XK_HomePage] = Key::HOMEPAGE;
164 xkeysym_map[XF86XK_Search] = Key::SEARCH;
165 xkeysym_map[XF86XK_AudioLowerVolume] = Key::VOLUMEDOWN;
166 xkeysym_map[XF86XK_AudioMute] = Key::VOLUMEMUTE;
167 xkeysym_map[XF86XK_AudioRaiseVolume] = Key::VOLUMEUP;
168 xkeysym_map[XF86XK_AudioPlay] = Key::MEDIAPLAY;
169 xkeysym_map[XF86XK_AudioStop] = Key::MEDIASTOP;
170 xkeysym_map[XF86XK_AudioPrev] = Key::MEDIAPREVIOUS;
171 xkeysym_map[XF86XK_AudioNext] = Key::MEDIANEXT;
172 xkeysym_map[XF86XK_AudioRecord] = Key::MEDIARECORD;
173 xkeysym_map[XF86XK_Standby] = Key::STANDBY;
174 // Launch keys.
175 xkeysym_map[XF86XK_Mail] = Key::LAUNCHMAIL;
176 xkeysym_map[XF86XK_AudioMedia] = Key::LAUNCHMEDIA;
177 xkeysym_map[XF86XK_MyComputer] = Key::LAUNCH0;
178 xkeysym_map[XF86XK_Calculator] = Key::LAUNCH1;
179 xkeysym_map[XF86XK_Launch0] = Key::LAUNCH2;
180 xkeysym_map[XF86XK_Launch1] = Key::LAUNCH3;
181 xkeysym_map[XF86XK_Launch2] = Key::LAUNCH4;
182 xkeysym_map[XF86XK_Launch3] = Key::LAUNCH5;
183 xkeysym_map[XF86XK_Launch4] = Key::LAUNCH6;
184 xkeysym_map[XF86XK_Launch5] = Key::LAUNCH7;
185 xkeysym_map[XF86XK_Launch6] = Key::LAUNCH8;
186 xkeysym_map[XF86XK_Launch7] = Key::LAUNCH9;
187 xkeysym_map[XF86XK_Launch8] = Key::LAUNCHA;
188 xkeysym_map[XF86XK_Launch9] = Key::LAUNCHB;
189 xkeysym_map[XF86XK_LaunchA] = Key::LAUNCHC;
190 xkeysym_map[XF86XK_LaunchB] = Key::LAUNCHD;
191 xkeysym_map[XF86XK_LaunchC] = Key::LAUNCHE;
192 xkeysym_map[XF86XK_LaunchD] = Key::LAUNCHF;
193
194 // Scancode to Godot Key map.
195 scancode_map[0x09] = Key::ESCAPE;
196 scancode_map[0x0A] = Key::KEY_1;
197 scancode_map[0x0B] = Key::KEY_2;
198 scancode_map[0x0C] = Key::KEY_3;
199 scancode_map[0x0D] = Key::KEY_4;
200 scancode_map[0x0E] = Key::KEY_5;
201 scancode_map[0x0F] = Key::KEY_6;
202 scancode_map[0x10] = Key::KEY_7;
203 scancode_map[0x11] = Key::KEY_8;
204 scancode_map[0x12] = Key::KEY_9;
205 scancode_map[0x13] = Key::KEY_0;
206 scancode_map[0x14] = Key::MINUS;
207 scancode_map[0x15] = Key::EQUAL;
208 scancode_map[0x16] = Key::BACKSPACE;
209 scancode_map[0x17] = Key::TAB;
210 scancode_map[0x18] = Key::Q;
211 scancode_map[0x19] = Key::W;
212 scancode_map[0x1A] = Key::E;
213 scancode_map[0x1B] = Key::R;
214 scancode_map[0x1C] = Key::T;
215 scancode_map[0x1D] = Key::Y;
216 scancode_map[0x1E] = Key::U;
217 scancode_map[0x1F] = Key::I;
218 scancode_map[0x20] = Key::O;
219 scancode_map[0x21] = Key::P;
220 scancode_map[0x22] = Key::BRACKETLEFT;
221 scancode_map[0x23] = Key::BRACKETRIGHT;
222 scancode_map[0x24] = Key::ENTER;
223 scancode_map[0x25] = Key::CTRL; // Left
224 scancode_map[0x26] = Key::A;
225 scancode_map[0x27] = Key::S;
226 scancode_map[0x28] = Key::D;
227 scancode_map[0x29] = Key::F;
228 scancode_map[0x2A] = Key::G;
229 scancode_map[0x2B] = Key::H;
230 scancode_map[0x2C] = Key::J;
231 scancode_map[0x2D] = Key::K;
232 scancode_map[0x2E] = Key::L;
233 scancode_map[0x2F] = Key::SEMICOLON;
234 scancode_map[0x30] = Key::APOSTROPHE;
235 scancode_map[0x31] = Key::QUOTELEFT;
236 scancode_map[0x32] = Key::SHIFT; // Left
237 scancode_map[0x33] = Key::BACKSLASH;
238 scancode_map[0x34] = Key::Z;
239 scancode_map[0x35] = Key::X;
240 scancode_map[0x36] = Key::C;
241 scancode_map[0x37] = Key::V;
242 scancode_map[0x38] = Key::B;
243 scancode_map[0x39] = Key::N;
244 scancode_map[0x3A] = Key::M;
245 scancode_map[0x3B] = Key::COMMA;
246 scancode_map[0x3C] = Key::PERIOD;
247 scancode_map[0x3D] = Key::SLASH;
248 scancode_map[0x3E] = Key::SHIFT; // Right
249 scancode_map[0x3F] = Key::KP_MULTIPLY;
250 scancode_map[0x40] = Key::ALT; // Left
251 scancode_map[0x41] = Key::SPACE;
252 scancode_map[0x42] = Key::CAPSLOCK;
253 scancode_map[0x43] = Key::F1;
254 scancode_map[0x44] = Key::F2;
255 scancode_map[0x45] = Key::F3;
256 scancode_map[0x46] = Key::F4;
257 scancode_map[0x47] = Key::F5;
258 scancode_map[0x48] = Key::F6;
259 scancode_map[0x49] = Key::F7;
260 scancode_map[0x4A] = Key::F8;
261 scancode_map[0x4B] = Key::F9;
262 scancode_map[0x4C] = Key::F10;
263 scancode_map[0x4D] = Key::NUMLOCK;
264 scancode_map[0x4E] = Key::SCROLLLOCK;
265 scancode_map[0x4F] = Key::KP_7;
266 scancode_map[0x50] = Key::KP_8;
267 scancode_map[0x51] = Key::KP_9;
268 scancode_map[0x52] = Key::KP_SUBTRACT;
269 scancode_map[0x53] = Key::KP_4;
270 scancode_map[0x54] = Key::KP_5;
271 scancode_map[0x55] = Key::KP_6;
272 scancode_map[0x56] = Key::KP_ADD;
273 scancode_map[0x57] = Key::KP_1;
274 scancode_map[0x58] = Key::KP_2;
275 scancode_map[0x59] = Key::KP_3;
276 scancode_map[0x5A] = Key::KP_0;
277 scancode_map[0x5B] = Key::KP_PERIOD;
278 //scancode_map[0x5C]
279 //scancode_map[0x5D] // Zenkaku Hankaku
280 scancode_map[0x5E] = Key::SECTION;
281 scancode_map[0x5F] = Key::F11;
282 scancode_map[0x60] = Key::F12;
283 //scancode_map[0x61] // Romaji
284 //scancode_map[0x62] // Katakana
285 //scancode_map[0x63] // Hiragana
286 //scancode_map[0x64] // Henkan
287 //scancode_map[0x65] // Hiragana Katakana
288 //scancode_map[0x66] // Muhenkan
289 scancode_map[0x67] = Key::COMMA; // KP_Separator
290 scancode_map[0x68] = Key::KP_ENTER;
291 scancode_map[0x69] = Key::CTRL; // Right
292 scancode_map[0x6A] = Key::KP_DIVIDE;
293 scancode_map[0x6B] = Key::PRINT;
294 scancode_map[0x6C] = Key::ALT; // Right
295 scancode_map[0x6D] = Key::ENTER;
296 scancode_map[0x6E] = Key::HOME;
297 scancode_map[0x6F] = Key::UP;
298 scancode_map[0x70] = Key::PAGEUP;
299 scancode_map[0x71] = Key::LEFT;
300 scancode_map[0x72] = Key::RIGHT;
301 scancode_map[0x73] = Key::END;
302 scancode_map[0x74] = Key::DOWN;
303 scancode_map[0x75] = Key::PAGEDOWN;
304 scancode_map[0x76] = Key::INSERT;
305 scancode_map[0x77] = Key::KEY_DELETE;
306 //scancode_map[0x78] // Macro
307 scancode_map[0x79] = Key::VOLUMEMUTE;
308 scancode_map[0x7A] = Key::VOLUMEDOWN;
309 scancode_map[0x7B] = Key::VOLUMEUP;
310 //scancode_map[0x7C] // Power
311 scancode_map[0x7D] = Key::EQUAL; // KP_Equal
312 //scancode_map[0x7E] // KP_PlusMinus
313 scancode_map[0x7F] = Key::PAUSE;
314 scancode_map[0x80] = Key::LAUNCH0;
315 scancode_map[0x81] = Key::COMMA; // KP_Comma
316 //scancode_map[0x82] // Hangul
317 //scancode_map[0x83] // Hangul_Hanja
318 scancode_map[0x84] = Key::YEN;
319 scancode_map[0x85] = Key::META; // Left
320 scancode_map[0x86] = Key::META; // Right
321 scancode_map[0x87] = Key::MENU;
322
323 scancode_map[0xA6] = Key::BACK; // On Chromebooks
324 scancode_map[0xA7] = Key::FORWARD; // On Chromebooks
325
326 scancode_map[0xB5] = Key::REFRESH; // On Chromebooks
327
328 scancode_map[0xBF] = Key::F13;
329 scancode_map[0xC0] = Key::F14;
330 scancode_map[0xC1] = Key::F15;
331 scancode_map[0xC2] = Key::F16;
332 scancode_map[0xC3] = Key::F17;
333 scancode_map[0xC4] = Key::F18;
334 scancode_map[0xC5] = Key::F19;
335 scancode_map[0xC6] = Key::F20;
336 scancode_map[0xC7] = Key::F21;
337 scancode_map[0xC8] = Key::F22;
338 scancode_map[0xC9] = Key::F23;
339 scancode_map[0xCA] = Key::F24;
340 scancode_map[0xCB] = Key::F25;
341 scancode_map[0xCC] = Key::F26;
342 scancode_map[0xCD] = Key::F27;
343 scancode_map[0xCE] = Key::F28;
344 scancode_map[0xCF] = Key::F29;
345 scancode_map[0xD0] = Key::F30;
346 scancode_map[0xD1] = Key::F31;
347 scancode_map[0xD2] = Key::F32;
348 scancode_map[0xD3] = Key::F33;
349 scancode_map[0xD4] = Key::F34;
350 scancode_map[0xD5] = Key::F35;
351
352 // Godot to scancode map.
353 for (const KeyValue<unsigned int, Key> &E : scancode_map) {
354 scancode_map_inv[E.value] = E.key;
355 }
356
357 // Keysym to Unicode map, tables taken from FOX toolkit.
358 xkeysym_unicode_map[0x01A1] = 0x0104;
359 xkeysym_unicode_map[0x01A2] = 0x02D8;
360 xkeysym_unicode_map[0x01A3] = 0x0141;
361 xkeysym_unicode_map[0x01A5] = 0x013D;
362 xkeysym_unicode_map[0x01A6] = 0x015A;
363 xkeysym_unicode_map[0x01A9] = 0x0160;
364 xkeysym_unicode_map[0x01AA] = 0x015E;
365 xkeysym_unicode_map[0x01AB] = 0x0164;
366 xkeysym_unicode_map[0x01AC] = 0x0179;
367 xkeysym_unicode_map[0x01AE] = 0x017D;
368 xkeysym_unicode_map[0x01AF] = 0x017B;
369 xkeysym_unicode_map[0x01B1] = 0x0105;
370 xkeysym_unicode_map[0x01B2] = 0x02DB;
371 xkeysym_unicode_map[0x01B3] = 0x0142;
372 xkeysym_unicode_map[0x01B5] = 0x013E;
373 xkeysym_unicode_map[0x01B6] = 0x015B;
374 xkeysym_unicode_map[0x01B7] = 0x02C7;
375 xkeysym_unicode_map[0x01B9] = 0x0161;
376 xkeysym_unicode_map[0x01BA] = 0x015F;
377 xkeysym_unicode_map[0x01BB] = 0x0165;
378 xkeysym_unicode_map[0x01BC] = 0x017A;
379 xkeysym_unicode_map[0x01BD] = 0x02DD;
380 xkeysym_unicode_map[0x01BE] = 0x017E;
381 xkeysym_unicode_map[0x01BF] = 0x017C;
382 xkeysym_unicode_map[0x01C0] = 0x0154;
383 xkeysym_unicode_map[0x01C3] = 0x0102;
384 xkeysym_unicode_map[0x01C5] = 0x0139;
385 xkeysym_unicode_map[0x01C6] = 0x0106;
386 xkeysym_unicode_map[0x01C8] = 0x010C;
387 xkeysym_unicode_map[0x01CA] = 0x0118;
388 xkeysym_unicode_map[0x01CC] = 0x011A;
389 xkeysym_unicode_map[0x01CF] = 0x010E;
390 xkeysym_unicode_map[0x01D0] = 0x0110;
391 xkeysym_unicode_map[0x01D1] = 0x0143;
392 xkeysym_unicode_map[0x01D2] = 0x0147;
393 xkeysym_unicode_map[0x01D5] = 0x0150;
394 xkeysym_unicode_map[0x01D8] = 0x0158;
395 xkeysym_unicode_map[0x01D9] = 0x016E;
396 xkeysym_unicode_map[0x01DB] = 0x0170;
397 xkeysym_unicode_map[0x01DE] = 0x0162;
398 xkeysym_unicode_map[0x01E0] = 0x0155;
399 xkeysym_unicode_map[0x01E3] = 0x0103;
400 xkeysym_unicode_map[0x01E5] = 0x013A;
401 xkeysym_unicode_map[0x01E6] = 0x0107;
402 xkeysym_unicode_map[0x01E8] = 0x010D;
403 xkeysym_unicode_map[0x01EA] = 0x0119;
404 xkeysym_unicode_map[0x01EC] = 0x011B;
405 xkeysym_unicode_map[0x01EF] = 0x010F;
406 xkeysym_unicode_map[0x01F0] = 0x0111;
407 xkeysym_unicode_map[0x01F1] = 0x0144;
408 xkeysym_unicode_map[0x01F2] = 0x0148;
409 xkeysym_unicode_map[0x01F5] = 0x0151;
410 xkeysym_unicode_map[0x01F8] = 0x0159;
411 xkeysym_unicode_map[0x01F9] = 0x016F;
412 xkeysym_unicode_map[0x01FB] = 0x0171;
413 xkeysym_unicode_map[0x01FE] = 0x0163;
414 xkeysym_unicode_map[0x01FF] = 0x02D9;
415 xkeysym_unicode_map[0x02A1] = 0x0126;
416 xkeysym_unicode_map[0x02A6] = 0x0124;
417 xkeysym_unicode_map[0x02A9] = 0x0130;
418 xkeysym_unicode_map[0x02AB] = 0x011E;
419 xkeysym_unicode_map[0x02AC] = 0x0134;
420 xkeysym_unicode_map[0x02B1] = 0x0127;
421 xkeysym_unicode_map[0x02B6] = 0x0125;
422 xkeysym_unicode_map[0x02B9] = 0x0131;
423 xkeysym_unicode_map[0x02BB] = 0x011F;
424 xkeysym_unicode_map[0x02BC] = 0x0135;
425 xkeysym_unicode_map[0x02C5] = 0x010A;
426 xkeysym_unicode_map[0x02C6] = 0x0108;
427 xkeysym_unicode_map[0x02D5] = 0x0120;
428 xkeysym_unicode_map[0x02D8] = 0x011C;
429 xkeysym_unicode_map[0x02DD] = 0x016C;
430 xkeysym_unicode_map[0x02DE] = 0x015C;
431 xkeysym_unicode_map[0x02E5] = 0x010B;
432 xkeysym_unicode_map[0x02E6] = 0x0109;
433 xkeysym_unicode_map[0x02F5] = 0x0121;
434 xkeysym_unicode_map[0x02F8] = 0x011D;
435 xkeysym_unicode_map[0x02FD] = 0x016D;
436 xkeysym_unicode_map[0x02FE] = 0x015D;
437 xkeysym_unicode_map[0x03A2] = 0x0138;
438 xkeysym_unicode_map[0x03A3] = 0x0156;
439 xkeysym_unicode_map[0x03A5] = 0x0128;
440 xkeysym_unicode_map[0x03A6] = 0x013B;
441 xkeysym_unicode_map[0x03AA] = 0x0112;
442 xkeysym_unicode_map[0x03AB] = 0x0122;
443 xkeysym_unicode_map[0x03AC] = 0x0166;
444 xkeysym_unicode_map[0x03B3] = 0x0157;
445 xkeysym_unicode_map[0x03B5] = 0x0129;
446 xkeysym_unicode_map[0x03B6] = 0x013C;
447 xkeysym_unicode_map[0x03BA] = 0x0113;
448 xkeysym_unicode_map[0x03BB] = 0x0123;
449 xkeysym_unicode_map[0x03BC] = 0x0167;
450 xkeysym_unicode_map[0x03BD] = 0x014A;
451 xkeysym_unicode_map[0x03BF] = 0x014B;
452 xkeysym_unicode_map[0x03C0] = 0x0100;
453 xkeysym_unicode_map[0x03C7] = 0x012E;
454 xkeysym_unicode_map[0x03CC] = 0x0116;
455 xkeysym_unicode_map[0x03CF] = 0x012A;
456 xkeysym_unicode_map[0x03D1] = 0x0145;
457 xkeysym_unicode_map[0x03D2] = 0x014C;
458 xkeysym_unicode_map[0x03D3] = 0x0136;
459 xkeysym_unicode_map[0x03D9] = 0x0172;
460 xkeysym_unicode_map[0x03DD] = 0x0168;
461 xkeysym_unicode_map[0x03DE] = 0x016A;
462 xkeysym_unicode_map[0x03E0] = 0x0101;
463 xkeysym_unicode_map[0x03E7] = 0x012F;
464 xkeysym_unicode_map[0x03EC] = 0x0117;
465 xkeysym_unicode_map[0x03EF] = 0x012B;
466 xkeysym_unicode_map[0x03F1] = 0x0146;
467 xkeysym_unicode_map[0x03F2] = 0x014D;
468 xkeysym_unicode_map[0x03F3] = 0x0137;
469 xkeysym_unicode_map[0x03F9] = 0x0173;
470 xkeysym_unicode_map[0x03FD] = 0x0169;
471 xkeysym_unicode_map[0x03FE] = 0x016B;
472 xkeysym_unicode_map[0x047E] = 0x203E;
473 xkeysym_unicode_map[0x04A1] = 0x3002;
474 xkeysym_unicode_map[0x04A2] = 0x300C;
475 xkeysym_unicode_map[0x04A3] = 0x300D;
476 xkeysym_unicode_map[0x04A4] = 0x3001;
477 xkeysym_unicode_map[0x04A5] = 0x30FB;
478 xkeysym_unicode_map[0x04A6] = 0x30F2;
479 xkeysym_unicode_map[0x04A7] = 0x30A1;
480 xkeysym_unicode_map[0x04A8] = 0x30A3;
481 xkeysym_unicode_map[0x04A9] = 0x30A5;
482 xkeysym_unicode_map[0x04AA] = 0x30A7;
483 xkeysym_unicode_map[0x04AB] = 0x30A9;
484 xkeysym_unicode_map[0x04AC] = 0x30E3;
485 xkeysym_unicode_map[0x04AD] = 0x30E5;
486 xkeysym_unicode_map[0x04AE] = 0x30E7;
487 xkeysym_unicode_map[0x04AF] = 0x30C3;
488 xkeysym_unicode_map[0x04B0] = 0x30FC;
489 xkeysym_unicode_map[0x04B1] = 0x30A2;
490 xkeysym_unicode_map[0x04B2] = 0x30A4;
491 xkeysym_unicode_map[0x04B3] = 0x30A6;
492 xkeysym_unicode_map[0x04B4] = 0x30A8;
493 xkeysym_unicode_map[0x04B5] = 0x30AA;
494 xkeysym_unicode_map[0x04B6] = 0x30AB;
495 xkeysym_unicode_map[0x04B7] = 0x30AD;
496 xkeysym_unicode_map[0x04B8] = 0x30AF;
497 xkeysym_unicode_map[0x04B9] = 0x30B1;
498 xkeysym_unicode_map[0x04BA] = 0x30B3;
499 xkeysym_unicode_map[0x04BB] = 0x30B5;
500 xkeysym_unicode_map[0x04BC] = 0x30B7;
501 xkeysym_unicode_map[0x04BD] = 0x30B9;
502 xkeysym_unicode_map[0x04BE] = 0x30BB;
503 xkeysym_unicode_map[0x04BF] = 0x30BD;
504 xkeysym_unicode_map[0x04C0] = 0x30BF;
505 xkeysym_unicode_map[0x04C1] = 0x30C1;
506 xkeysym_unicode_map[0x04C2] = 0x30C4;
507 xkeysym_unicode_map[0x04C3] = 0x30C6;
508 xkeysym_unicode_map[0x04C4] = 0x30C8;
509 xkeysym_unicode_map[0x04C5] = 0x30CA;
510 xkeysym_unicode_map[0x04C6] = 0x30CB;
511 xkeysym_unicode_map[0x04C7] = 0x30CC;
512 xkeysym_unicode_map[0x04C8] = 0x30CD;
513 xkeysym_unicode_map[0x04C9] = 0x30CE;
514 xkeysym_unicode_map[0x04CA] = 0x30CF;
515 xkeysym_unicode_map[0x04CB] = 0x30D2;
516 xkeysym_unicode_map[0x04CC] = 0x30D5;
517 xkeysym_unicode_map[0x04CD] = 0x30D8;
518 xkeysym_unicode_map[0x04CE] = 0x30DB;
519 xkeysym_unicode_map[0x04CF] = 0x30DE;
520 xkeysym_unicode_map[0x04D0] = 0x30DF;
521 xkeysym_unicode_map[0x04D1] = 0x30E0;
522 xkeysym_unicode_map[0x04D2] = 0x30E1;
523 xkeysym_unicode_map[0x04D3] = 0x30E2;
524 xkeysym_unicode_map[0x04D4] = 0x30E4;
525 xkeysym_unicode_map[0x04D5] = 0x30E6;
526 xkeysym_unicode_map[0x04D6] = 0x30E8;
527 xkeysym_unicode_map[0x04D7] = 0x30E9;
528 xkeysym_unicode_map[0x04D8] = 0x30EA;
529 xkeysym_unicode_map[0x04D9] = 0x30EB;
530 xkeysym_unicode_map[0x04DA] = 0x30EC;
531 xkeysym_unicode_map[0x04DB] = 0x30ED;
532 xkeysym_unicode_map[0x04DC] = 0x30EF;
533 xkeysym_unicode_map[0x04DD] = 0x30F3;
534 xkeysym_unicode_map[0x04DE] = 0x309B;
535 xkeysym_unicode_map[0x04DF] = 0x309C;
536 xkeysym_unicode_map[0x05AC] = 0x060C;
537 xkeysym_unicode_map[0x05BB] = 0x061B;
538 xkeysym_unicode_map[0x05BF] = 0x061F;
539 xkeysym_unicode_map[0x05C1] = 0x0621;
540 xkeysym_unicode_map[0x05C2] = 0x0622;
541 xkeysym_unicode_map[0x05C3] = 0x0623;
542 xkeysym_unicode_map[0x05C4] = 0x0624;
543 xkeysym_unicode_map[0x05C5] = 0x0625;
544 xkeysym_unicode_map[0x05C6] = 0x0626;
545 xkeysym_unicode_map[0x05C7] = 0x0627;
546 xkeysym_unicode_map[0x05C8] = 0x0628;
547 xkeysym_unicode_map[0x05C9] = 0x0629;
548 xkeysym_unicode_map[0x05CA] = 0x062A;
549 xkeysym_unicode_map[0x05CB] = 0x062B;
550 xkeysym_unicode_map[0x05CC] = 0x062C;
551 xkeysym_unicode_map[0x05CD] = 0x062D;
552 xkeysym_unicode_map[0x05CE] = 0x062E;
553 xkeysym_unicode_map[0x05CF] = 0x062F;
554 xkeysym_unicode_map[0x05D0] = 0x0630;
555 xkeysym_unicode_map[0x05D1] = 0x0631;
556 xkeysym_unicode_map[0x05D2] = 0x0632;
557 xkeysym_unicode_map[0x05D3] = 0x0633;
558 xkeysym_unicode_map[0x05D4] = 0x0634;
559 xkeysym_unicode_map[0x05D5] = 0x0635;
560 xkeysym_unicode_map[0x05D6] = 0x0636;
561 xkeysym_unicode_map[0x05D7] = 0x0637;
562 xkeysym_unicode_map[0x05D8] = 0x0638;
563 xkeysym_unicode_map[0x05D9] = 0x0639;
564 xkeysym_unicode_map[0x05DA] = 0x063A;
565 xkeysym_unicode_map[0x05E0] = 0x0640;
566 xkeysym_unicode_map[0x05E1] = 0x0641;
567 xkeysym_unicode_map[0x05E2] = 0x0642;
568 xkeysym_unicode_map[0x05E3] = 0x0643;
569 xkeysym_unicode_map[0x05E4] = 0x0644;
570 xkeysym_unicode_map[0x05E5] = 0x0645;
571 xkeysym_unicode_map[0x05E6] = 0x0646;
572 xkeysym_unicode_map[0x05E7] = 0x0647;
573 xkeysym_unicode_map[0x05E8] = 0x0648;
574 xkeysym_unicode_map[0x05E9] = 0x0649;
575 xkeysym_unicode_map[0x05EA] = 0x064A;
576 xkeysym_unicode_map[0x05EB] = 0x064B;
577 xkeysym_unicode_map[0x05EC] = 0x064C;
578 xkeysym_unicode_map[0x05ED] = 0x064D;
579 xkeysym_unicode_map[0x05EE] = 0x064E;
580 xkeysym_unicode_map[0x05EF] = 0x064F;
581 xkeysym_unicode_map[0x05F0] = 0x0650;
582 xkeysym_unicode_map[0x05F1] = 0x0651;
583 xkeysym_unicode_map[0x05F2] = 0x0652;
584 xkeysym_unicode_map[0x06A1] = 0x0452;
585 xkeysym_unicode_map[0x06A2] = 0x0453;
586 xkeysym_unicode_map[0x06A3] = 0x0451;
587 xkeysym_unicode_map[0x06A4] = 0x0454;
588 xkeysym_unicode_map[0x06A5] = 0x0455;
589 xkeysym_unicode_map[0x06A6] = 0x0456;
590 xkeysym_unicode_map[0x06A7] = 0x0457;
591 xkeysym_unicode_map[0x06A8] = 0x0458;
592 xkeysym_unicode_map[0x06A9] = 0x0459;
593 xkeysym_unicode_map[0x06AA] = 0x045A;
594 xkeysym_unicode_map[0x06AB] = 0x045B;
595 xkeysym_unicode_map[0x06AC] = 0x045C;
596 xkeysym_unicode_map[0x06AE] = 0x045E;
597 xkeysym_unicode_map[0x06AF] = 0x045F;
598 xkeysym_unicode_map[0x06B0] = 0x2116;
599 xkeysym_unicode_map[0x06B1] = 0x0402;
600 xkeysym_unicode_map[0x06B2] = 0x0403;
601 xkeysym_unicode_map[0x06B3] = 0x0401;
602 xkeysym_unicode_map[0x06B4] = 0x0404;
603 xkeysym_unicode_map[0x06B5] = 0x0405;
604 xkeysym_unicode_map[0x06B6] = 0x0406;
605 xkeysym_unicode_map[0x06B7] = 0x0407;
606 xkeysym_unicode_map[0x06B8] = 0x0408;
607 xkeysym_unicode_map[0x06B9] = 0x0409;
608 xkeysym_unicode_map[0x06BA] = 0x040A;
609 xkeysym_unicode_map[0x06BB] = 0x040B;
610 xkeysym_unicode_map[0x06BC] = 0x040C;
611 xkeysym_unicode_map[0x06BE] = 0x040E;
612 xkeysym_unicode_map[0x06BF] = 0x040F;
613 xkeysym_unicode_map[0x06C0] = 0x044E;
614 xkeysym_unicode_map[0x06C1] = 0x0430;
615 xkeysym_unicode_map[0x06C2] = 0x0431;
616 xkeysym_unicode_map[0x06C3] = 0x0446;
617 xkeysym_unicode_map[0x06C4] = 0x0434;
618 xkeysym_unicode_map[0x06C5] = 0x0435;
619 xkeysym_unicode_map[0x06C6] = 0x0444;
620 xkeysym_unicode_map[0x06C7] = 0x0433;
621 xkeysym_unicode_map[0x06C8] = 0x0445;
622 xkeysym_unicode_map[0x06C9] = 0x0438;
623 xkeysym_unicode_map[0x06CA] = 0x0439;
624 xkeysym_unicode_map[0x06CB] = 0x043A;
625 xkeysym_unicode_map[0x06CC] = 0x043B;
626 xkeysym_unicode_map[0x06CD] = 0x043C;
627 xkeysym_unicode_map[0x06CE] = 0x043D;
628 xkeysym_unicode_map[0x06CF] = 0x043E;
629 xkeysym_unicode_map[0x06D0] = 0x043F;
630 xkeysym_unicode_map[0x06D1] = 0x044F;
631 xkeysym_unicode_map[0x06D2] = 0x0440;
632 xkeysym_unicode_map[0x06D3] = 0x0441;
633 xkeysym_unicode_map[0x06D4] = 0x0442;
634 xkeysym_unicode_map[0x06D5] = 0x0443;
635 xkeysym_unicode_map[0x06D6] = 0x0436;
636 xkeysym_unicode_map[0x06D7] = 0x0432;
637 xkeysym_unicode_map[0x06D8] = 0x044C;
638 xkeysym_unicode_map[0x06D9] = 0x044B;
639 xkeysym_unicode_map[0x06DA] = 0x0437;
640 xkeysym_unicode_map[0x06DB] = 0x0448;
641 xkeysym_unicode_map[0x06DC] = 0x044D;
642 xkeysym_unicode_map[0x06DD] = 0x0449;
643 xkeysym_unicode_map[0x06DE] = 0x0447;
644 xkeysym_unicode_map[0x06DF] = 0x044A;
645 xkeysym_unicode_map[0x06E0] = 0x042E;
646 xkeysym_unicode_map[0x06E1] = 0x0410;
647 xkeysym_unicode_map[0x06E2] = 0x0411;
648 xkeysym_unicode_map[0x06E3] = 0x0426;
649 xkeysym_unicode_map[0x06E4] = 0x0414;
650 xkeysym_unicode_map[0x06E5] = 0x0415;
651 xkeysym_unicode_map[0x06E6] = 0x0424;
652 xkeysym_unicode_map[0x06E7] = 0x0413;
653 xkeysym_unicode_map[0x06E8] = 0x0425;
654 xkeysym_unicode_map[0x06E9] = 0x0418;
655 xkeysym_unicode_map[0x06EA] = 0x0419;
656 xkeysym_unicode_map[0x06EB] = 0x041A;
657 xkeysym_unicode_map[0x06EC] = 0x041B;
658 xkeysym_unicode_map[0x06ED] = 0x041C;
659 xkeysym_unicode_map[0x06EE] = 0x041D;
660 xkeysym_unicode_map[0x06EF] = 0x041E;
661 xkeysym_unicode_map[0x06F0] = 0x041F;
662 xkeysym_unicode_map[0x06F1] = 0x042F;
663 xkeysym_unicode_map[0x06F2] = 0x0420;
664 xkeysym_unicode_map[0x06F3] = 0x0421;
665 xkeysym_unicode_map[0x06F4] = 0x0422;
666 xkeysym_unicode_map[0x06F5] = 0x0423;
667 xkeysym_unicode_map[0x06F6] = 0x0416;
668 xkeysym_unicode_map[0x06F7] = 0x0412;
669 xkeysym_unicode_map[0x06F8] = 0x042C;
670 xkeysym_unicode_map[0x06F9] = 0x042B;
671 xkeysym_unicode_map[0x06FA] = 0x0417;
672 xkeysym_unicode_map[0x06FB] = 0x0428;
673 xkeysym_unicode_map[0x06FC] = 0x042D;
674 xkeysym_unicode_map[0x06FD] = 0x0429;
675 xkeysym_unicode_map[0x06FE] = 0x0427;
676 xkeysym_unicode_map[0x06FF] = 0x042A;
677 xkeysym_unicode_map[0x07A1] = 0x0386;
678 xkeysym_unicode_map[0x07A2] = 0x0388;
679 xkeysym_unicode_map[0x07A3] = 0x0389;
680 xkeysym_unicode_map[0x07A4] = 0x038A;
681 xkeysym_unicode_map[0x07A5] = 0x03AA;
682 xkeysym_unicode_map[0x07A7] = 0x038C;
683 xkeysym_unicode_map[0x07A8] = 0x038E;
684 xkeysym_unicode_map[0x07A9] = 0x03AB;
685 xkeysym_unicode_map[0x07AB] = 0x038F;
686 xkeysym_unicode_map[0x07AE] = 0x0385;
687 xkeysym_unicode_map[0x07AF] = 0x2015;
688 xkeysym_unicode_map[0x07B1] = 0x03AC;
689 xkeysym_unicode_map[0x07B2] = 0x03AD;
690 xkeysym_unicode_map[0x07B3] = 0x03AE;
691 xkeysym_unicode_map[0x07B4] = 0x03AF;
692 xkeysym_unicode_map[0x07B5] = 0x03CA;
693 xkeysym_unicode_map[0x07B6] = 0x0390;
694 xkeysym_unicode_map[0x07B7] = 0x03CC;
695 xkeysym_unicode_map[0x07B8] = 0x03CD;
696 xkeysym_unicode_map[0x07B9] = 0x03CB;
697 xkeysym_unicode_map[0x07BA] = 0x03B0;
698 xkeysym_unicode_map[0x07BB] = 0x03CE;
699 xkeysym_unicode_map[0x07C1] = 0x0391;
700 xkeysym_unicode_map[0x07C2] = 0x0392;
701 xkeysym_unicode_map[0x07C3] = 0x0393;
702 xkeysym_unicode_map[0x07C4] = 0x0394;
703 xkeysym_unicode_map[0x07C5] = 0x0395;
704 xkeysym_unicode_map[0x07C6] = 0x0396;
705 xkeysym_unicode_map[0x07C7] = 0x0397;
706 xkeysym_unicode_map[0x07C8] = 0x0398;
707 xkeysym_unicode_map[0x07C9] = 0x0399;
708 xkeysym_unicode_map[0x07CA] = 0x039A;
709 xkeysym_unicode_map[0x07CB] = 0x039B;
710 xkeysym_unicode_map[0x07CC] = 0x039C;
711 xkeysym_unicode_map[0x07CD] = 0x039D;
712 xkeysym_unicode_map[0x07CE] = 0x039E;
713 xkeysym_unicode_map[0x07CF] = 0x039F;
714 xkeysym_unicode_map[0x07D0] = 0x03A0;
715 xkeysym_unicode_map[0x07D1] = 0x03A1;
716 xkeysym_unicode_map[0x07D2] = 0x03A3;
717 xkeysym_unicode_map[0x07D4] = 0x03A4;
718 xkeysym_unicode_map[0x07D5] = 0x03A5;
719 xkeysym_unicode_map[0x07D6] = 0x03A6;
720 xkeysym_unicode_map[0x07D7] = 0x03A7;
721 xkeysym_unicode_map[0x07D8] = 0x03A8;
722 xkeysym_unicode_map[0x07D9] = 0x03A9;
723 xkeysym_unicode_map[0x07E1] = 0x03B1;
724 xkeysym_unicode_map[0x07E2] = 0x03B2;
725 xkeysym_unicode_map[0x07E3] = 0x03B3;
726 xkeysym_unicode_map[0x07E4] = 0x03B4;
727 xkeysym_unicode_map[0x07E5] = 0x03B5;
728 xkeysym_unicode_map[0x07E6] = 0x03B6;
729 xkeysym_unicode_map[0x07E7] = 0x03B7;
730 xkeysym_unicode_map[0x07E8] = 0x03B8;
731 xkeysym_unicode_map[0x07E9] = 0x03B9;
732 xkeysym_unicode_map[0x07EA] = 0x03BA;
733 xkeysym_unicode_map[0x07EB] = 0x03BB;
734 xkeysym_unicode_map[0x07EC] = 0x03BC;
735 xkeysym_unicode_map[0x07ED] = 0x03BD;
736 xkeysym_unicode_map[0x07EE] = 0x03BE;
737 xkeysym_unicode_map[0x07EF] = 0x03BF;
738 xkeysym_unicode_map[0x07F0] = 0x03C0;
739 xkeysym_unicode_map[0x07F1] = 0x03C1;
740 xkeysym_unicode_map[0x07F2] = 0x03C3;
741 xkeysym_unicode_map[0x07F3] = 0x03C2;
742 xkeysym_unicode_map[0x07F4] = 0x03C4;
743 xkeysym_unicode_map[0x07F5] = 0x03C5;
744 xkeysym_unicode_map[0x07F6] = 0x03C6;
745 xkeysym_unicode_map[0x07F7] = 0x03C7;
746 xkeysym_unicode_map[0x07F8] = 0x03C8;
747 xkeysym_unicode_map[0x07F9] = 0x03C9;
748 xkeysym_unicode_map[0x08A1] = 0x23B7;
749 xkeysym_unicode_map[0x08A2] = 0x250C;
750 xkeysym_unicode_map[0x08A3] = 0x2500;
751 xkeysym_unicode_map[0x08A4] = 0x2320;
752 xkeysym_unicode_map[0x08A5] = 0x2321;
753 xkeysym_unicode_map[0x08A6] = 0x2502;
754 xkeysym_unicode_map[0x08A7] = 0x23A1;
755 xkeysym_unicode_map[0x08A8] = 0x23A3;
756 xkeysym_unicode_map[0x08A9] = 0x23A4;
757 xkeysym_unicode_map[0x08AA] = 0x23A6;
758 xkeysym_unicode_map[0x08AB] = 0x239B;
759 xkeysym_unicode_map[0x08AC] = 0x239D;
760 xkeysym_unicode_map[0x08AD] = 0x239E;
761 xkeysym_unicode_map[0x08AE] = 0x23A0;
762 xkeysym_unicode_map[0x08AF] = 0x23A8;
763 xkeysym_unicode_map[0x08B0] = 0x23AC;
764 xkeysym_unicode_map[0x08BC] = 0x2264;
765 xkeysym_unicode_map[0x08BD] = 0x2260;
766 xkeysym_unicode_map[0x08BE] = 0x2265;
767 xkeysym_unicode_map[0x08BF] = 0x222B;
768 xkeysym_unicode_map[0x08C0] = 0x2234;
769 xkeysym_unicode_map[0x08C1] = 0x221D;
770 xkeysym_unicode_map[0x08C2] = 0x221E;
771 xkeysym_unicode_map[0x08C5] = 0x2207;
772 xkeysym_unicode_map[0x08C8] = 0x223C;
773 xkeysym_unicode_map[0x08C9] = 0x2243;
774 xkeysym_unicode_map[0x08CD] = 0x21D4;
775 xkeysym_unicode_map[0x08CE] = 0x21D2;
776 xkeysym_unicode_map[0x08CF] = 0x2261;
777 xkeysym_unicode_map[0x08D6] = 0x221A;
778 xkeysym_unicode_map[0x08DA] = 0x2282;
779 xkeysym_unicode_map[0x08DB] = 0x2283;
780 xkeysym_unicode_map[0x08DC] = 0x2229;
781 xkeysym_unicode_map[0x08DD] = 0x222A;
782 xkeysym_unicode_map[0x08DE] = 0x2227;
783 xkeysym_unicode_map[0x08DF] = 0x2228;
784 xkeysym_unicode_map[0x08EF] = 0x2202;
785 xkeysym_unicode_map[0x08F6] = 0x0192;
786 xkeysym_unicode_map[0x08FB] = 0x2190;
787 xkeysym_unicode_map[0x08FC] = 0x2191;
788 xkeysym_unicode_map[0x08FD] = 0x2192;
789 xkeysym_unicode_map[0x08FE] = 0x2193;
790 xkeysym_unicode_map[0x09E0] = 0x25C6;
791 xkeysym_unicode_map[0x09E1] = 0x2592;
792 xkeysym_unicode_map[0x09E2] = 0x2409;
793 xkeysym_unicode_map[0x09E3] = 0x240C;
794 xkeysym_unicode_map[0x09E4] = 0x240D;
795 xkeysym_unicode_map[0x09E5] = 0x240A;
796 xkeysym_unicode_map[0x09E8] = 0x2424;
797 xkeysym_unicode_map[0x09E9] = 0x240B;
798 xkeysym_unicode_map[0x09EA] = 0x2518;
799 xkeysym_unicode_map[0x09EB] = 0x2510;
800 xkeysym_unicode_map[0x09EC] = 0x250C;
801 xkeysym_unicode_map[0x09ED] = 0x2514;
802 xkeysym_unicode_map[0x09EE] = 0x253C;
803 xkeysym_unicode_map[0x09EF] = 0x23BA;
804 xkeysym_unicode_map[0x09F0] = 0x23BB;
805 xkeysym_unicode_map[0x09F1] = 0x2500;
806 xkeysym_unicode_map[0x09F2] = 0x23BC;
807 xkeysym_unicode_map[0x09F3] = 0x23BD;
808 xkeysym_unicode_map[0x09F4] = 0x251C;
809 xkeysym_unicode_map[0x09F5] = 0x2524;
810 xkeysym_unicode_map[0x09F6] = 0x2534;
811 xkeysym_unicode_map[0x09F7] = 0x252C;
812 xkeysym_unicode_map[0x09F8] = 0x2502;
813 xkeysym_unicode_map[0x0AA1] = 0x2003;
814 xkeysym_unicode_map[0x0AA2] = 0x2002;
815 xkeysym_unicode_map[0x0AA3] = 0x2004;
816 xkeysym_unicode_map[0x0AA4] = 0x2005;
817 xkeysym_unicode_map[0x0AA5] = 0x2007;
818 xkeysym_unicode_map[0x0AA6] = 0x2008;
819 xkeysym_unicode_map[0x0AA7] = 0x2009;
820 xkeysym_unicode_map[0x0AA8] = 0x200A;
821 xkeysym_unicode_map[0x0AA9] = 0x2014;
822 xkeysym_unicode_map[0x0AAA] = 0x2013;
823 xkeysym_unicode_map[0x0AAE] = 0x2026;
824 xkeysym_unicode_map[0x0AAF] = 0x2025;
825 xkeysym_unicode_map[0x0AB0] = 0x2153;
826 xkeysym_unicode_map[0x0AB1] = 0x2154;
827 xkeysym_unicode_map[0x0AB2] = 0x2155;
828 xkeysym_unicode_map[0x0AB3] = 0x2156;
829 xkeysym_unicode_map[0x0AB4] = 0x2157;
830 xkeysym_unicode_map[0x0AB5] = 0x2158;
831 xkeysym_unicode_map[0x0AB6] = 0x2159;
832 xkeysym_unicode_map[0x0AB7] = 0x215A;
833 xkeysym_unicode_map[0x0AB8] = 0x2105;
834 xkeysym_unicode_map[0x0ABB] = 0x2012;
835 xkeysym_unicode_map[0x0ABC] = 0x2329;
836 xkeysym_unicode_map[0x0ABE] = 0x232A;
837 xkeysym_unicode_map[0x0AC3] = 0x215B;
838 xkeysym_unicode_map[0x0AC4] = 0x215C;
839 xkeysym_unicode_map[0x0AC5] = 0x215D;
840 xkeysym_unicode_map[0x0AC6] = 0x215E;
841 xkeysym_unicode_map[0x0AC9] = 0x2122;
842 xkeysym_unicode_map[0x0ACA] = 0x2613;
843 xkeysym_unicode_map[0x0ACC] = 0x25C1;
844 xkeysym_unicode_map[0x0ACD] = 0x25B7;
845 xkeysym_unicode_map[0x0ACE] = 0x25CB;
846 xkeysym_unicode_map[0x0ACF] = 0x25AF;
847 xkeysym_unicode_map[0x0AD0] = 0x2018;
848 xkeysym_unicode_map[0x0AD1] = 0x2019;
849 xkeysym_unicode_map[0x0AD2] = 0x201C;
850 xkeysym_unicode_map[0x0AD3] = 0x201D;
851 xkeysym_unicode_map[0x0AD4] = 0x211E;
852 xkeysym_unicode_map[0x0AD6] = 0x2032;
853 xkeysym_unicode_map[0x0AD7] = 0x2033;
854 xkeysym_unicode_map[0x0AD9] = 0x271D;
855 xkeysym_unicode_map[0x0ADB] = 0x25AC;
856 xkeysym_unicode_map[0x0ADC] = 0x25C0;
857 xkeysym_unicode_map[0x0ADD] = 0x25B6;
858 xkeysym_unicode_map[0x0ADE] = 0x25CF;
859 xkeysym_unicode_map[0x0ADF] = 0x25AE;
860 xkeysym_unicode_map[0x0AE0] = 0x25E6;
861 xkeysym_unicode_map[0x0AE1] = 0x25AB;
862 xkeysym_unicode_map[0x0AE2] = 0x25AD;
863 xkeysym_unicode_map[0x0AE3] = 0x25B3;
864 xkeysym_unicode_map[0x0AE4] = 0x25BD;
865 xkeysym_unicode_map[0x0AE5] = 0x2606;
866 xkeysym_unicode_map[0x0AE6] = 0x2022;
867 xkeysym_unicode_map[0x0AE7] = 0x25AA;
868 xkeysym_unicode_map[0x0AE8] = 0x25B2;
869 xkeysym_unicode_map[0x0AE9] = 0x25BC;
870 xkeysym_unicode_map[0x0AEA] = 0x261C;
871 xkeysym_unicode_map[0x0AEB] = 0x261E;
872 xkeysym_unicode_map[0x0AEC] = 0x2663;
873 xkeysym_unicode_map[0x0AED] = 0x2666;
874 xkeysym_unicode_map[0x0AEE] = 0x2665;
875 xkeysym_unicode_map[0x0AF0] = 0x2720;
876 xkeysym_unicode_map[0x0AF1] = 0x2020;
877 xkeysym_unicode_map[0x0AF2] = 0x2021;
878 xkeysym_unicode_map[0x0AF3] = 0x2713;
879 xkeysym_unicode_map[0x0AF4] = 0x2717;
880 xkeysym_unicode_map[0x0AF5] = 0x266F;
881 xkeysym_unicode_map[0x0AF6] = 0x266D;
882 xkeysym_unicode_map[0x0AF7] = 0x2642;
883 xkeysym_unicode_map[0x0AF8] = 0x2640;
884 xkeysym_unicode_map[0x0AF9] = 0x260E;
885 xkeysym_unicode_map[0x0AFA] = 0x2315;
886 xkeysym_unicode_map[0x0AFB] = 0x2117;
887 xkeysym_unicode_map[0x0AFC] = 0x2038;
888 xkeysym_unicode_map[0x0AFD] = 0x201A;
889 xkeysym_unicode_map[0x0AFE] = 0x201E;
890 xkeysym_unicode_map[0x0BA3] = 0x003C;
891 xkeysym_unicode_map[0x0BA6] = 0x003E;
892 xkeysym_unicode_map[0x0BA8] = 0x2228;
893 xkeysym_unicode_map[0x0BA9] = 0x2227;
894 xkeysym_unicode_map[0x0BC0] = 0x00AF;
895 xkeysym_unicode_map[0x0BC2] = 0x22A5;
896 xkeysym_unicode_map[0x0BC3] = 0x2229;
897 xkeysym_unicode_map[0x0BC4] = 0x230A;
898 xkeysym_unicode_map[0x0BC6] = 0x005F;
899 xkeysym_unicode_map[0x0BCA] = 0x2218;
900 xkeysym_unicode_map[0x0BCC] = 0x2395;
901 xkeysym_unicode_map[0x0BCE] = 0x22A4;
902 xkeysym_unicode_map[0x0BCF] = 0x25CB;
903 xkeysym_unicode_map[0x0BD3] = 0x2308;
904 xkeysym_unicode_map[0x0BD6] = 0x222A;
905 xkeysym_unicode_map[0x0BD8] = 0x2283;
906 xkeysym_unicode_map[0x0BDA] = 0x2282;
907 xkeysym_unicode_map[0x0BDC] = 0x22A2;
908 xkeysym_unicode_map[0x0BFC] = 0x22A3;
909 xkeysym_unicode_map[0x0CDF] = 0x2017;
910 xkeysym_unicode_map[0x0CE0] = 0x05D0;
911 xkeysym_unicode_map[0x0CE1] = 0x05D1;
912 xkeysym_unicode_map[0x0CE2] = 0x05D2;
913 xkeysym_unicode_map[0x0CE3] = 0x05D3;
914 xkeysym_unicode_map[0x0CE4] = 0x05D4;
915 xkeysym_unicode_map[0x0CE5] = 0x05D5;
916 xkeysym_unicode_map[0x0CE6] = 0x05D6;
917 xkeysym_unicode_map[0x0CE7] = 0x05D7;
918 xkeysym_unicode_map[0x0CE8] = 0x05D8;
919 xkeysym_unicode_map[0x0CE9] = 0x05D9;
920 xkeysym_unicode_map[0x0CEA] = 0x05DA;
921 xkeysym_unicode_map[0x0CEB] = 0x05DB;
922 xkeysym_unicode_map[0x0CEC] = 0x05DC;
923 xkeysym_unicode_map[0x0CED] = 0x05DD;
924 xkeysym_unicode_map[0x0CEE] = 0x05DE;
925 xkeysym_unicode_map[0x0CEF] = 0x05DF;
926 xkeysym_unicode_map[0x0CF0] = 0x05E0;
927 xkeysym_unicode_map[0x0CF1] = 0x05E1;
928 xkeysym_unicode_map[0x0CF2] = 0x05E2;
929 xkeysym_unicode_map[0x0CF3] = 0x05E3;
930 xkeysym_unicode_map[0x0CF4] = 0x05E4;
931 xkeysym_unicode_map[0x0CF5] = 0x05E5;
932 xkeysym_unicode_map[0x0CF6] = 0x05E6;
933 xkeysym_unicode_map[0x0CF7] = 0x05E7;
934 xkeysym_unicode_map[0x0CF8] = 0x05E8;
935 xkeysym_unicode_map[0x0CF9] = 0x05E9;
936 xkeysym_unicode_map[0x0CFA] = 0x05EA;
937 xkeysym_unicode_map[0x0DA1] = 0x0E01;
938 xkeysym_unicode_map[0x0DA2] = 0x0E02;
939 xkeysym_unicode_map[0x0DA3] = 0x0E03;
940 xkeysym_unicode_map[0x0DA4] = 0x0E04;
941 xkeysym_unicode_map[0x0DA5] = 0x0E05;
942 xkeysym_unicode_map[0x0DA6] = 0x0E06;
943 xkeysym_unicode_map[0x0DA7] = 0x0E07;
944 xkeysym_unicode_map[0x0DA8] = 0x0E08;
945 xkeysym_unicode_map[0x0DA9] = 0x0E09;
946 xkeysym_unicode_map[0x0DAA] = 0x0E0A;
947 xkeysym_unicode_map[0x0DAB] = 0x0E0B;
948 xkeysym_unicode_map[0x0DAC] = 0x0E0C;
949 xkeysym_unicode_map[0x0DAD] = 0x0E0D;
950 xkeysym_unicode_map[0x0DAE] = 0x0E0E;
951 xkeysym_unicode_map[0x0DAF] = 0x0E0F;
952 xkeysym_unicode_map[0x0DB0] = 0x0E10;
953 xkeysym_unicode_map[0x0DB1] = 0x0E11;
954 xkeysym_unicode_map[0x0DB2] = 0x0E12;
955 xkeysym_unicode_map[0x0DB3] = 0x0E13;
956 xkeysym_unicode_map[0x0DB4] = 0x0E14;
957 xkeysym_unicode_map[0x0DB5] = 0x0E15;
958 xkeysym_unicode_map[0x0DB6] = 0x0E16;
959 xkeysym_unicode_map[0x0DB7] = 0x0E17;
960 xkeysym_unicode_map[0x0DB8] = 0x0E18;
961 xkeysym_unicode_map[0x0DB9] = 0x0E19;
962 xkeysym_unicode_map[0x0DBA] = 0x0E1A;
963 xkeysym_unicode_map[0x0DBB] = 0x0E1B;
964 xkeysym_unicode_map[0x0DBC] = 0x0E1C;
965 xkeysym_unicode_map[0x0DBD] = 0x0E1D;
966 xkeysym_unicode_map[0x0DBE] = 0x0E1E;
967 xkeysym_unicode_map[0x0DBF] = 0x0E1F;
968 xkeysym_unicode_map[0x0DC0] = 0x0E20;
969 xkeysym_unicode_map[0x0DC1] = 0x0E21;
970 xkeysym_unicode_map[0x0DC2] = 0x0E22;
971 xkeysym_unicode_map[0x0DC3] = 0x0E23;
972 xkeysym_unicode_map[0x0DC4] = 0x0E24;
973 xkeysym_unicode_map[0x0DC5] = 0x0E25;
974 xkeysym_unicode_map[0x0DC6] = 0x0E26;
975 xkeysym_unicode_map[0x0DC7] = 0x0E27;
976 xkeysym_unicode_map[0x0DC8] = 0x0E28;
977 xkeysym_unicode_map[0x0DC9] = 0x0E29;
978 xkeysym_unicode_map[0x0DCA] = 0x0E2A;
979 xkeysym_unicode_map[0x0DCB] = 0x0E2B;
980 xkeysym_unicode_map[0x0DCC] = 0x0E2C;
981 xkeysym_unicode_map[0x0DCD] = 0x0E2D;
982 xkeysym_unicode_map[0x0DCE] = 0x0E2E;
983 xkeysym_unicode_map[0x0DCF] = 0x0E2F;
984 xkeysym_unicode_map[0x0DD0] = 0x0E30;
985 xkeysym_unicode_map[0x0DD1] = 0x0E31;
986 xkeysym_unicode_map[0x0DD2] = 0x0E32;
987 xkeysym_unicode_map[0x0DD3] = 0x0E33;
988 xkeysym_unicode_map[0x0DD4] = 0x0E34;
989 xkeysym_unicode_map[0x0DD5] = 0x0E35;
990 xkeysym_unicode_map[0x0DD6] = 0x0E36;
991 xkeysym_unicode_map[0x0DD7] = 0x0E37;
992 xkeysym_unicode_map[0x0DD8] = 0x0E38;
993 xkeysym_unicode_map[0x0DD9] = 0x0E39;
994 xkeysym_unicode_map[0x0DDA] = 0x0E3A;
995 xkeysym_unicode_map[0x0DDF] = 0x0E3F;
996 xkeysym_unicode_map[0x0DE0] = 0x0E40;
997 xkeysym_unicode_map[0x0DE1] = 0x0E41;
998 xkeysym_unicode_map[0x0DE2] = 0x0E42;
999 xkeysym_unicode_map[0x0DE3] = 0x0E43;
1000 xkeysym_unicode_map[0x0DE4] = 0x0E44;
1001 xkeysym_unicode_map[0x0DE5] = 0x0E45;
1002 xkeysym_unicode_map[0x0DE6] = 0x0E46;
1003 xkeysym_unicode_map[0x0DE7] = 0x0E47;
1004 xkeysym_unicode_map[0x0DE8] = 0x0E48;
1005 xkeysym_unicode_map[0x0DE9] = 0x0E49;
1006 xkeysym_unicode_map[0x0DEA] = 0x0E4A;
1007 xkeysym_unicode_map[0x0DEB] = 0x0E4B;
1008 xkeysym_unicode_map[0x0DEC] = 0x0E4C;
1009 xkeysym_unicode_map[0x0DED] = 0x0E4D;
1010 xkeysym_unicode_map[0x0DF0] = 0x0E50;
1011 xkeysym_unicode_map[0x0DF1] = 0x0E51;
1012 xkeysym_unicode_map[0x0DF2] = 0x0E52;
1013 xkeysym_unicode_map[0x0DF3] = 0x0E53;
1014 xkeysym_unicode_map[0x0DF4] = 0x0E54;
1015 xkeysym_unicode_map[0x0DF5] = 0x0E55;
1016 xkeysym_unicode_map[0x0DF6] = 0x0E56;
1017 xkeysym_unicode_map[0x0DF7] = 0x0E57;
1018 xkeysym_unicode_map[0x0DF8] = 0x0E58;
1019 xkeysym_unicode_map[0x0DF9] = 0x0E59;
1020 xkeysym_unicode_map[0x0EA1] = 0x3131;
1021 xkeysym_unicode_map[0x0EA2] = 0x3132;
1022 xkeysym_unicode_map[0x0EA3] = 0x3133;
1023 xkeysym_unicode_map[0x0EA4] = 0x3134;
1024 xkeysym_unicode_map[0x0EA5] = 0x3135;
1025 xkeysym_unicode_map[0x0EA6] = 0x3136;
1026 xkeysym_unicode_map[0x0EA7] = 0x3137;
1027 xkeysym_unicode_map[0x0EA8] = 0x3138;
1028 xkeysym_unicode_map[0x0EA9] = 0x3139;
1029 xkeysym_unicode_map[0x0EAA] = 0x313A;
1030 xkeysym_unicode_map[0x0EAB] = 0x313B;
1031 xkeysym_unicode_map[0x0EAC] = 0x313C;
1032 xkeysym_unicode_map[0x0EAD] = 0x313D;
1033 xkeysym_unicode_map[0x0EAE] = 0x313E;
1034 xkeysym_unicode_map[0x0EAF] = 0x313F;
1035 xkeysym_unicode_map[0x0EB0] = 0x3140;
1036 xkeysym_unicode_map[0x0EB1] = 0x3141;
1037 xkeysym_unicode_map[0x0EB2] = 0x3142;
1038 xkeysym_unicode_map[0x0EB3] = 0x3143;
1039 xkeysym_unicode_map[0x0EB4] = 0x3144;
1040 xkeysym_unicode_map[0x0EB5] = 0x3145;
1041 xkeysym_unicode_map[0x0EB6] = 0x3146;
1042 xkeysym_unicode_map[0x0EB7] = 0x3147;
1043 xkeysym_unicode_map[0x0EB8] = 0x3148;
1044 xkeysym_unicode_map[0x0EB9] = 0x3149;
1045 xkeysym_unicode_map[0x0EBA] = 0x314A;
1046 xkeysym_unicode_map[0x0EBB] = 0x314B;
1047 xkeysym_unicode_map[0x0EBC] = 0x314C;
1048 xkeysym_unicode_map[0x0EBD] = 0x314D;
1049 xkeysym_unicode_map[0x0EBE] = 0x314E;
1050 xkeysym_unicode_map[0x0EBF] = 0x314F;
1051 xkeysym_unicode_map[0x0EC0] = 0x3150;
1052 xkeysym_unicode_map[0x0EC1] = 0x3151;
1053 xkeysym_unicode_map[0x0EC2] = 0x3152;
1054 xkeysym_unicode_map[0x0EC3] = 0x3153;
1055 xkeysym_unicode_map[0x0EC4] = 0x3154;
1056 xkeysym_unicode_map[0x0EC5] = 0x3155;
1057 xkeysym_unicode_map[0x0EC6] = 0x3156;
1058 xkeysym_unicode_map[0x0EC7] = 0x3157;
1059 xkeysym_unicode_map[0x0EC8] = 0x3158;
1060 xkeysym_unicode_map[0x0EC9] = 0x3159;
1061 xkeysym_unicode_map[0x0ECA] = 0x315A;
1062 xkeysym_unicode_map[0x0ECB] = 0x315B;
1063 xkeysym_unicode_map[0x0ECC] = 0x315C;
1064 xkeysym_unicode_map[0x0ECD] = 0x315D;
1065 xkeysym_unicode_map[0x0ECE] = 0x315E;
1066 xkeysym_unicode_map[0x0ECF] = 0x315F;
1067 xkeysym_unicode_map[0x0ED0] = 0x3160;
1068 xkeysym_unicode_map[0x0ED1] = 0x3161;
1069 xkeysym_unicode_map[0x0ED2] = 0x3162;
1070 xkeysym_unicode_map[0x0ED3] = 0x3163;
1071 xkeysym_unicode_map[0x0ED4] = 0x11A8;
1072 xkeysym_unicode_map[0x0ED5] = 0x11A9;
1073 xkeysym_unicode_map[0x0ED6] = 0x11AA;
1074 xkeysym_unicode_map[0x0ED7] = 0x11AB;
1075 xkeysym_unicode_map[0x0ED8] = 0x11AC;
1076 xkeysym_unicode_map[0x0ED9] = 0x11AD;
1077 xkeysym_unicode_map[0x0EDA] = 0x11AE;
1078 xkeysym_unicode_map[0x0EDB] = 0x11AF;
1079 xkeysym_unicode_map[0x0EDC] = 0x11B0;
1080 xkeysym_unicode_map[0x0EDD] = 0x11B1;
1081 xkeysym_unicode_map[0x0EDE] = 0x11B2;
1082 xkeysym_unicode_map[0x0EDF] = 0x11B3;
1083 xkeysym_unicode_map[0x0EE0] = 0x11B4;
1084 xkeysym_unicode_map[0x0EE1] = 0x11B5;
1085 xkeysym_unicode_map[0x0EE2] = 0x11B6;
1086 xkeysym_unicode_map[0x0EE3] = 0x11B7;
1087 xkeysym_unicode_map[0x0EE4] = 0x11B8;
1088 xkeysym_unicode_map[0x0EE5] = 0x11B9;
1089 xkeysym_unicode_map[0x0EE6] = 0x11BA;
1090 xkeysym_unicode_map[0x0EE7] = 0x11BB;
1091 xkeysym_unicode_map[0x0EE8] = 0x11BC;
1092 xkeysym_unicode_map[0x0EE9] = 0x11BD;
1093 xkeysym_unicode_map[0x0EEA] = 0x11BE;
1094 xkeysym_unicode_map[0x0EEB] = 0x11BF;
1095 xkeysym_unicode_map[0x0EEC] = 0x11C0;
1096 xkeysym_unicode_map[0x0EED] = 0x11C1;
1097 xkeysym_unicode_map[0x0EEE] = 0x11C2;
1098 xkeysym_unicode_map[0x0EEF] = 0x316D;
1099 xkeysym_unicode_map[0x0EF0] = 0x3171;
1100 xkeysym_unicode_map[0x0EF1] = 0x3178;
1101 xkeysym_unicode_map[0x0EF2] = 0x317F;
1102 xkeysym_unicode_map[0x0EF3] = 0x3181;
1103 xkeysym_unicode_map[0x0EF4] = 0x3184;
1104 xkeysym_unicode_map[0x0EF5] = 0x3186;
1105 xkeysym_unicode_map[0x0EF6] = 0x318D;
1106 xkeysym_unicode_map[0x0EF7] = 0x318E;
1107 xkeysym_unicode_map[0x0EF8] = 0x11EB;
1108 xkeysym_unicode_map[0x0EF9] = 0x11F0;
1109 xkeysym_unicode_map[0x0EFA] = 0x11F9;
1110 xkeysym_unicode_map[0x0EFF] = 0x20A9;
1111 xkeysym_unicode_map[0x13A4] = 0x20AC;
1112 xkeysym_unicode_map[0x13BC] = 0x0152;
1113 xkeysym_unicode_map[0x13BD] = 0x0153;
1114 xkeysym_unicode_map[0x13BE] = 0x0178;
1115 xkeysym_unicode_map[0x20AC] = 0x20AC;
1116}
1117
1118Key KeyMappingX11::get_keycode(KeySym p_keysym) {
1119 if (p_keysym >= 0x20 && p_keysym < 0x7E) { // ASCII, maps 1-1
1120 if (p_keysym > 0x60 && p_keysym < 0x7B) { // Lowercase ASCII.
1121 return (Key)(p_keysym - 32);
1122 } else {
1123 return (Key)p_keysym;
1124 }
1125 }
1126
1127 const Key *key = xkeysym_map.getptr(p_keysym);
1128 if (key) {
1129 return *key;
1130 }
1131 return Key::NONE;
1132}
1133
1134Key KeyMappingX11::get_scancode(unsigned int p_code) {
1135 const Key *key = scancode_map.getptr(p_code);
1136 if (key) {
1137 return *key;
1138 }
1139
1140 return Key::NONE;
1141}
1142
1143unsigned int KeyMappingX11::get_xlibcode(Key p_keysym) {
1144 const unsigned int *key = scancode_map_inv.getptr(p_keysym);
1145 if (key) {
1146 return *key;
1147 }
1148 return 0x00;
1149}
1150
1151char32_t KeyMappingX11::get_unicode_from_keysym(KeySym p_keysym) {
1152 // Latin-1
1153 if (p_keysym >= 0x20 && p_keysym <= 0x7E) {
1154 return p_keysym;
1155 }
1156 if (p_keysym >= 0xA0 && p_keysym <= 0xFF) {
1157 return p_keysym;
1158 }
1159
1160 // Keypad to Latin-1.
1161 if (p_keysym >= 0xFFAA && p_keysym <= 0xFFB9) {
1162 return p_keysym - 0xFF80;
1163 }
1164
1165 // Unicode (may be present).
1166 if ((p_keysym & 0xFF000000) == 0x01000000) {
1167 return p_keysym & 0x00FFFFFF;
1168 }
1169
1170 const char32_t *c = xkeysym_unicode_map.getptr(p_keysym);
1171 if (c) {
1172 return *c;
1173 }
1174 return 0;
1175}
1176