NaCl cleanup: Stop linking the old, glibc-based Non-SFI runtime into nacl_helper
[chromium-blink-merge.git] / ui / events / x / keysym_to_unicode.cc
blobd097490ca9312df267f3069daa63493d7f3f56ab
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/events/x/keysym_to_unicode.h"
7 // Define XK_xxx before the #include of <X11/keysym.h> so that <X11/keysym.h>
8 // defines all KeySyms we need.
9 #define XK_MISCELLANY
10 #define XK_LATIN1
11 #define XK_LATIN2
12 #define XK_LATIN3
13 #define XK_LATIN4
14 #define XK_LATIN8
15 #define XK_LATIN9
16 #define XK_KATAKANA
17 #define XK_ARABIC
18 #define XK_CYRILLIC
19 #define XK_GREEK
20 #define XK_TECHNICAL
21 #define XK_SPECIAL
22 #define XK_PUBLISHING
23 #define XK_APL
24 #define XK_HEBREW
25 #define XK_THAI
26 #define XK_KOREAN
27 #define XK_ARMENIAN
28 #define XK_GEORGIAN
29 #define XK_CAUCASUS
30 #define XK_VIETNAMESE
31 #define XK_CURRENCY
32 #define XK_MATHEMATICAL
33 #define XK_BRAILLE
34 #define XK_SINHALA
35 #include <X11/X.h>
36 #include <X11/keysym.h>
38 #ifndef XK_dead_greek
39 #define XK_dead_greek 0xfe8c
40 #endif
42 #include <unordered_map>
44 #include "base/lazy_instance.h"
45 #include "base/macros.h"
47 namespace ui {
49 const struct {
50 KeySym keysym;
51 uint16_t unicode;
52 } g_keysym_to_unicode_table[] = {
53 // Control characters
54 {XK_BackSpace, 0x0008},
55 {XK_Tab, 0x0009},
56 {XK_Linefeed, 0x000a},
57 {XK_Clear, 0x000b},
58 {XK_Return, 0x000d},
59 {XK_Escape, 0x001b},
60 {XK_Delete, 0x007f},
62 // Numeric keypad
63 {XK_KP_Space, 0x0020},
64 {XK_KP_Tab, 0x0009},
65 {XK_KP_Enter, 0x000d},
66 {XK_KP_Equal, 0x003d},
67 {XK_KP_Multiply, 0x002a},
68 {XK_KP_Add, 0x002b},
69 {XK_KP_Separator, 0x002c},
70 {XK_KP_Subtract, 0x002d},
71 {XK_KP_Decimal, 0x002e},
72 {XK_KP_Divide, 0x002f},
73 {XK_KP_0, 0x0030},
74 {XK_KP_1, 0x0031},
75 {XK_KP_2, 0x0032},
76 {XK_KP_3, 0x0033},
77 {XK_KP_4, 0x0034},
78 {XK_KP_5, 0x0035},
79 {XK_KP_6, 0x0036},
80 {XK_KP_7, 0x0037},
81 {XK_KP_8, 0x0038},
82 {XK_KP_9, 0x0039},
84 // Latin 1 KeySyms map 1:1 to Unicode
86 // Latin 2
87 {XK_Aogonek, 0x0104}, // LATIN CAPITAL LETTER A WITH OGONEK
88 {XK_breve, 0x02D8}, // BREVE
89 {XK_Lstroke, 0x0141}, // LATIN CAPITAL LETTER L WITH STROKE
90 {XK_Lcaron, 0x013D}, // LATIN CAPITAL LETTER L WITH CARON
91 {XK_Sacute, 0x015A}, // LATIN CAPITAL LETTER S WITH ACUTE
92 {XK_Scaron, 0x0160}, // LATIN CAPITAL LETTER S WITH CARON
93 {XK_Scedilla, 0x015E}, // LATIN CAPITAL LETTER S WITH CEDILLA
94 {XK_Tcaron, 0x0164}, // LATIN CAPITAL LETTER T WITH CARON
95 {XK_Zacute, 0x0179}, // LATIN CAPITAL LETTER Z WITH ACUTE
96 {XK_Zcaron, 0x017D}, // LATIN CAPITAL LETTER Z WITH CARON
97 {XK_Zabovedot, 0x017B}, // LATIN CAPITAL LETTER Z WITH DOT ABOVE
98 {XK_aogonek, 0x0105}, // LATIN SMALL LETTER A WITH OGONEK
99 {XK_ogonek, 0x02DB}, // OGONEK
100 {XK_lstroke, 0x0142}, // LATIN SMALL LETTER L WITH STROKE
101 {XK_lcaron, 0x013E}, // LATIN SMALL LETTER L WITH CARON
102 {XK_sacute, 0x015B}, // LATIN SMALL LETTER S WITH ACUTE
103 {XK_caron, 0x02C7}, // CARON
104 {XK_scaron, 0x0161}, // LATIN SMALL LETTER S WITH CARON
105 {XK_scedilla, 0x015F}, // LATIN SMALL LETTER S WITH CEDILLA
106 {XK_tcaron, 0x0165}, // LATIN SMALL LETTER T WITH CARON
107 {XK_zacute, 0x017A}, // LATIN SMALL LETTER Z WITH ACUTE
108 {XK_doubleacute, 0x02DD}, // DOUBLE ACUTE ACCENT
109 {XK_zcaron, 0x017E}, // LATIN SMALL LETTER Z WITH CARON
110 {XK_zabovedot, 0x017C}, // LATIN SMALL LETTER Z WITH DOT ABOVE
111 {XK_Racute, 0x0154}, // LATIN CAPITAL LETTER R WITH ACUTE
112 {XK_Abreve, 0x0102}, // LATIN CAPITAL LETTER A WITH BREVE
113 {XK_Lacute, 0x0139}, // LATIN CAPITAL LETTER L WITH ACUTE
114 {XK_Cacute, 0x0106}, // LATIN CAPITAL LETTER C WITH ACUTE
115 {XK_Ccaron, 0x010C}, // LATIN CAPITAL LETTER C WITH CARON
116 {XK_Eogonek, 0x0118}, // LATIN CAPITAL LETTER E WITH OGONEK
117 {XK_Ecaron, 0x011A}, // LATIN CAPITAL LETTER E WITH CARON
118 {XK_Dcaron, 0x010E}, // LATIN CAPITAL LETTER D WITH CARON
119 {XK_Dstroke, 0x0110}, // LATIN CAPITAL LETTER D WITH STROKE
120 {XK_Nacute, 0x0143}, // LATIN CAPITAL LETTER N WITH ACUTE
121 {XK_Ncaron, 0x0147}, // LATIN CAPITAL LETTER N WITH CARON
122 {XK_Odoubleacute, 0x0150}, // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
123 {XK_Rcaron, 0x0158}, // LATIN CAPITAL LETTER R WITH CARON
124 {XK_Uring, 0x016E}, // LATIN CAPITAL LETTER U WITH RING ABOVE
125 {XK_Udoubleacute, 0x0170}, // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
126 {XK_Tcedilla, 0x0162}, // LATIN CAPITAL LETTER T WITH CEDILLA
127 {XK_racute, 0x0155}, // LATIN SMALL LETTER R WITH ACUTE
128 {XK_abreve, 0x0103}, // LATIN SMALL LETTER A WITH BREVE
129 {XK_lacute, 0x013A}, // LATIN SMALL LETTER L WITH ACUTE
130 {XK_cacute, 0x0107}, // LATIN SMALL LETTER C WITH ACUTE
131 {XK_ccaron, 0x010D}, // LATIN SMALL LETTER C WITH CARON
132 {XK_eogonek, 0x0119}, // LATIN SMALL LETTER E WITH OGONEK
133 {XK_ecaron, 0x011B}, // LATIN SMALL LETTER E WITH CARON
134 {XK_dcaron, 0x010F}, // LATIN SMALL LETTER D WITH CARON
135 {XK_dstroke, 0x0111}, // LATIN SMALL LETTER D WITH STROKE
136 {XK_nacute, 0x0144}, // LATIN SMALL LETTER N WITH ACUTE
137 {XK_ncaron, 0x0148}, // LATIN SMALL LETTER N WITH CARON
138 {XK_odoubleacute, 0x0151}, // LATIN SMALL LETTER O WITH DOUBLE ACUTE
139 {XK_rcaron, 0x0159}, // LATIN SMALL LETTER R WITH CARON
140 {XK_uring, 0x016F}, // LATIN SMALL LETTER U WITH RING ABOVE
141 {XK_udoubleacute, 0x0171}, // LATIN SMALL LETTER U WITH DOUBLE ACUTE
142 {XK_tcedilla, 0x0163}, // LATIN SMALL LETTER T WITH CEDILLA
143 {XK_abovedot, 0x02D9}, // DOT ABOVE
145 // Latin 3
146 {XK_Hstroke, 0x0126}, // LATIN CAPITAL LETTER H WITH STROKE
147 {XK_Hcircumflex, 0x0124}, // LATIN CAPITAL LETTER H WITH CIRCUMFLEX
148 {XK_Iabovedot, 0x0130}, // LATIN CAPITAL LETTER I WITH DOT ABOVE
149 {XK_Gbreve, 0x011E}, // LATIN CAPITAL LETTER G WITH BREVE
150 {XK_Jcircumflex, 0x0134}, // LATIN CAPITAL LETTER J WITH CIRCUMFLEX
151 {XK_hstroke, 0x0127}, // LATIN SMALL LETTER H WITH STROKE
152 {XK_hcircumflex, 0x0125}, // LATIN SMALL LETTER H WITH CIRCUMFLEX
153 {XK_idotless, 0x0131}, // LATIN SMALL LETTER DOTLESS I
154 {XK_gbreve, 0x011F}, // LATIN SMALL LETTER G WITH BREVE
155 {XK_jcircumflex, 0x0135}, // LATIN SMALL LETTER J WITH CIRCUMFLEX
156 {XK_Cabovedot, 0x010A}, // LATIN CAPITAL LETTER C WITH DOT ABOVE
157 {XK_Ccircumflex, 0x0108}, // LATIN CAPITAL LETTER C WITH CIRCUMFLEX
158 {XK_Gabovedot, 0x0120}, // LATIN CAPITAL LETTER G WITH DOT ABOVE
159 {XK_Gcircumflex, 0x011C}, // LATIN CAPITAL LETTER G WITH CIRCUMFLEX
160 {XK_Ubreve, 0x016C}, // LATIN CAPITAL LETTER U WITH BREVE
161 {XK_Scircumflex, 0x015C}, // LATIN CAPITAL LETTER S WITH CIRCUMFLEX
162 {XK_cabovedot, 0x010B}, // LATIN SMALL LETTER C WITH DOT ABOVE
163 {XK_ccircumflex, 0x0109}, // LATIN SMALL LETTER C WITH CIRCUMFLEX
164 {XK_gabovedot, 0x0121}, // LATIN SMALL LETTER G WITH DOT ABOVE
165 {XK_gcircumflex, 0x011D}, // LATIN SMALL LETTER G WITH CIRCUMFLEX
166 {XK_ubreve, 0x016D}, // LATIN SMALL LETTER U WITH BREVE
167 {XK_scircumflex, 0x015D}, // LATIN SMALL LETTER S WITH CIRCUMFLEX
169 // Latin 4
170 {XK_kra, 0x0138}, // LATIN SMALL LETTER KRA
171 {XK_Rcedilla, 0x0156}, // LATIN CAPITAL LETTER R WITH CEDILLA
172 {XK_Itilde, 0x0128}, // LATIN CAPITAL LETTER I WITH TILDE
173 {XK_Lcedilla, 0x013B}, // LATIN CAPITAL LETTER L WITH CEDILLA
174 {XK_Emacron, 0x0112}, // LATIN CAPITAL LETTER E WITH MACRON
175 {XK_Gcedilla, 0x0122}, // LATIN CAPITAL LETTER G WITH CEDILLA
176 {XK_Tslash, 0x0166}, // LATIN CAPITAL LETTER T WITH STROKE
177 {XK_rcedilla, 0x0157}, // LATIN SMALL LETTER R WITH CEDILLA
178 {XK_itilde, 0x0129}, // LATIN SMALL LETTER I WITH TILDE
179 {XK_lcedilla, 0x013C}, // LATIN SMALL LETTER L WITH CEDILLA
180 {XK_emacron, 0x0113}, // LATIN SMALL LETTER E WITH MACRON
181 {XK_gcedilla, 0x0123}, // LATIN SMALL LETTER G WITH CEDILLA
182 {XK_tslash, 0x0167}, // LATIN SMALL LETTER T WITH STROKE
183 {XK_ENG, 0x014A}, // LATIN CAPITAL LETTER ENG
184 {XK_eng, 0x014B}, // LATIN SMALL LETTER ENG
185 {XK_Amacron, 0x0100}, // LATIN CAPITAL LETTER A WITH MACRON
186 {XK_Iogonek, 0x012E}, // LATIN CAPITAL LETTER I WITH OGONEK
187 {XK_Eabovedot, 0x0116}, // LATIN CAPITAL LETTER E WITH DOT ABOVE
188 {XK_Imacron, 0x012A}, // LATIN CAPITAL LETTER I WITH MACRON
189 {XK_Ncedilla, 0x0145}, // LATIN CAPITAL LETTER N WITH CEDILLA
190 {XK_Omacron, 0x014C}, // LATIN CAPITAL LETTER O WITH MACRON
191 {XK_Kcedilla, 0x0136}, // LATIN CAPITAL LETTER K WITH CEDILLA
192 {XK_Uogonek, 0x0172}, // LATIN CAPITAL LETTER U WITH OGONEK
193 {XK_Utilde, 0x0168}, // LATIN CAPITAL LETTER U WITH TILDE
194 {XK_Umacron, 0x016A}, // LATIN CAPITAL LETTER U WITH MACRON
195 {XK_amacron, 0x0101}, // LATIN SMALL LETTER A WITH MACRON
196 {XK_iogonek, 0x012F}, // LATIN SMALL LETTER I WITH OGONEK
197 {XK_eabovedot, 0x0117}, // LATIN SMALL LETTER E WITH DOT ABOVE
198 {XK_imacron, 0x012B}, // LATIN SMALL LETTER I WITH MACRON
199 {XK_ncedilla, 0x0146}, // LATIN SMALL LETTER N WITH CEDILLA
200 {XK_omacron, 0x014D}, // LATIN SMALL LETTER O WITH MACRON
201 {XK_kcedilla, 0x0137}, // LATIN SMALL LETTER K WITH CEDILLA
202 {XK_uogonek, 0x0173}, // LATIN SMALL LETTER U WITH OGONEK
203 {XK_utilde, 0x0169}, // LATIN SMALL LETTER U WITH TILDE
204 {XK_umacron, 0x016B}, // LATIN SMALL LETTER U WITH MACRON
206 // Latin 8 KeySyms map 1:1 to Unicode
208 // Latin 9
209 {XK_OE, 0x0152}, // LATIN CAPITAL LIGATURE OE
210 {XK_oe, 0x0153}, // LATIN SMALL LIGATURE OE
211 {XK_Ydiaeresis, 0x0178}, // LATIN CAPITAL LETTER Y WITH DIAERESIS
213 // Katakana
214 {XK_overline, 0x203E}, // OVERLINE
215 {XK_kana_fullstop, 0x3002}, // IDEOGRAPHIC FULL STOP
216 {XK_kana_openingbracket, 0x300C}, // LEFT CORNER BRACKET
217 {XK_kana_closingbracket, 0x300D}, // RIGHT CORNER BRACKET
218 {XK_kana_comma, 0x3001}, // IDEOGRAPHIC COMMA
219 {XK_kana_conjunctive, 0x30FB}, // KATAKANA MIDDLE DOT
220 {XK_kana_WO, 0x30F2}, // KATAKANA LETTER WO
221 {XK_kana_a, 0x30A1}, // KATAKANA LETTER SMALL A
222 {XK_kana_i, 0x30A3}, // KATAKANA LETTER SMALL I
223 {XK_kana_u, 0x30A5}, // KATAKANA LETTER SMALL U
224 {XK_kana_e, 0x30A7}, // KATAKANA LETTER SMALL E
225 {XK_kana_o, 0x30A9}, // KATAKANA LETTER SMALL O
226 {XK_kana_ya, 0x30E3}, // KATAKANA LETTER SMALL YA
227 {XK_kana_yu, 0x30E5}, // KATAKANA LETTER SMALL YU
228 {XK_kana_yo, 0x30E7}, // KATAKANA LETTER SMALL YO
229 {XK_kana_tsu, 0x30C3}, // KATAKANA LETTER SMALL TU
230 {XK_prolongedsound, 0x30FC}, // KATAKANA-HIRAGANA PROLONGED SOUND MARK
231 {XK_kana_A, 0x30A2}, // KATAKANA LETTER A
232 {XK_kana_I, 0x30A4}, // KATAKANA LETTER I
233 {XK_kana_U, 0x30A6}, // KATAKANA LETTER U
234 {XK_kana_E, 0x30A8}, // KATAKANA LETTER E
235 {XK_kana_O, 0x30AA}, // KATAKANA LETTER O
236 {XK_kana_KA, 0x30AB}, // KATAKANA LETTER KA
237 {XK_kana_KI, 0x30AD}, // KATAKANA LETTER KI
238 {XK_kana_KU, 0x30AF}, // KATAKANA LETTER KU
239 {XK_kana_KE, 0x30B1}, // KATAKANA LETTER KE
240 {XK_kana_KO, 0x30B3}, // KATAKANA LETTER KO
241 {XK_kana_SA, 0x30B5}, // KATAKANA LETTER SA
242 {XK_kana_SHI, 0x30B7}, // KATAKANA LETTER SI
243 {XK_kana_SU, 0x30B9}, // KATAKANA LETTER SU
244 {XK_kana_SE, 0x30BB}, // KATAKANA LETTER SE
245 {XK_kana_SO, 0x30BD}, // KATAKANA LETTER SO
246 {XK_kana_TA, 0x30BF}, // KATAKANA LETTER TA
247 {XK_kana_CHI, 0x30C1}, // KATAKANA LETTER TI
248 {XK_kana_TSU, 0x30C4}, // KATAKANA LETTER TU
249 {XK_kana_TE, 0x30C6}, // KATAKANA LETTER TE
250 {XK_kana_TO, 0x30C8}, // KATAKANA LETTER TO
251 {XK_kana_NA, 0x30CA}, // KATAKANA LETTER NA
252 {XK_kana_NI, 0x30CB}, // KATAKANA LETTER NI
253 {XK_kana_NU, 0x30CC}, // KATAKANA LETTER NU
254 {XK_kana_NE, 0x30CD}, // KATAKANA LETTER NE
255 {XK_kana_NO, 0x30CE}, // KATAKANA LETTER NO
256 {XK_kana_HA, 0x30CF}, // KATAKANA LETTER HA
257 {XK_kana_HI, 0x30D2}, // KATAKANA LETTER HI
258 {XK_kana_FU, 0x30D5}, // KATAKANA LETTER HU
259 {XK_kana_HE, 0x30D8}, // KATAKANA LETTER HE
260 {XK_kana_HO, 0x30DB}, // KATAKANA LETTER HO
261 {XK_kana_MA, 0x30DE}, // KATAKANA LETTER MA
262 {XK_kana_MI, 0x30DF}, // KATAKANA LETTER MI
263 {XK_kana_MU, 0x30E0}, // KATAKANA LETTER MU
264 {XK_kana_ME, 0x30E1}, // KATAKANA LETTER ME
265 {XK_kana_MO, 0x30E2}, // KATAKANA LETTER MO
266 {XK_kana_YA, 0x30E4}, // KATAKANA LETTER YA
267 {XK_kana_YU, 0x30E6}, // KATAKANA LETTER YU
268 {XK_kana_YO, 0x30E8}, // KATAKANA LETTER YO
269 {XK_kana_RA, 0x30E9}, // KATAKANA LETTER RA
270 {XK_kana_RI, 0x30EA}, // KATAKANA LETTER RI
271 {XK_kana_RU, 0x30EB}, // KATAKANA LETTER RU
272 {XK_kana_RE, 0x30EC}, // KATAKANA LETTER RE
273 {XK_kana_RO, 0x30ED}, // KATAKANA LETTER RO
274 {XK_kana_WA, 0x30EF}, // KATAKANA LETTER WA
275 {XK_kana_N, 0x30F3}, // KATAKANA LETTER N
276 {XK_voicedsound, 0x309B}, // KATAKANA-HIRAGANA VOICED SOUND MARK
277 {XK_semivoicedsound, 0x309C}, // KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
279 // Arabic KeySyms partially map 1:1 to Unicode
280 {XK_Arabic_comma, 0x060C}, // ARABIC COMMA
281 {XK_Arabic_semicolon, 0x061B}, // ARABIC SEMICOLON
282 {XK_Arabic_question_mark, 0x061F}, // ARABIC QUESTION MARK
283 {XK_Arabic_hamza, 0x0621}, // ARABIC LETTER HAMZA
284 {XK_Arabic_maddaonalef, 0x0622}, // ARABIC LETTER ALEF WITH MADDA ABOVE
285 {XK_Arabic_hamzaonalef, 0x0623}, // ARABIC LETTER ALEF WITH HAMZA ABOVE
286 {XK_Arabic_hamzaonwaw, 0x0624}, // ARABIC LETTER WAW WITH HAMZA ABOVE
287 {XK_Arabic_hamzaunderalef, 0x0625}, // ARABIC LETTER ALEF WITH HAMZA BELOW
288 {XK_Arabic_hamzaonyeh, 0x0626}, // ARABIC LETTER YEH WITH HAMZA ABOVE
289 {XK_Arabic_alef, 0x0627}, // ARABIC LETTER ALEF
290 {XK_Arabic_beh, 0x0628}, // ARABIC LETTER BEH
291 {XK_Arabic_tehmarbuta, 0x0629}, // ARABIC LETTER TEH MARBUTA
292 {XK_Arabic_teh, 0x062A}, // ARABIC LETTER TEH
293 {XK_Arabic_theh, 0x062B}, // ARABIC LETTER THEH
294 {XK_Arabic_jeem, 0x062C}, // ARABIC LETTER JEEM
295 {XK_Arabic_hah, 0x062D}, // ARABIC LETTER HAH
296 {XK_Arabic_khah, 0x062E}, // ARABIC LETTER KHAH
297 {XK_Arabic_dal, 0x062F}, // ARABIC LETTER DAL
298 {XK_Arabic_thal, 0x0630}, // ARABIC LETTER THAL
299 {XK_Arabic_ra, 0x0631}, // ARABIC LETTER REH
300 {XK_Arabic_zain, 0x0632}, // ARABIC LETTER ZAIN
301 {XK_Arabic_seen, 0x0633}, // ARABIC LETTER SEEN
302 {XK_Arabic_sheen, 0x0634}, // ARABIC LETTER SHEEN
303 {XK_Arabic_sad, 0x0635}, // ARABIC LETTER SAD
304 {XK_Arabic_dad, 0x0636}, // ARABIC LETTER DAD
305 {XK_Arabic_tah, 0x0637}, // ARABIC LETTER TAH
306 {XK_Arabic_zah, 0x0638}, // ARABIC LETTER ZAH
307 {XK_Arabic_ain, 0x0639}, // ARABIC LETTER AIN
308 {XK_Arabic_ghain, 0x063A}, // ARABIC LETTER GHAIN
309 {XK_Arabic_tatweel, 0x0640}, // ARABIC TATWEEL
310 {XK_Arabic_feh, 0x0641}, // ARABIC LETTER FEH
311 {XK_Arabic_qaf, 0x0642}, // ARABIC LETTER QAF
312 {XK_Arabic_kaf, 0x0643}, // ARABIC LETTER KAF
313 {XK_Arabic_lam, 0x0644}, // ARABIC LETTER LAM
314 {XK_Arabic_meem, 0x0645}, // ARABIC LETTER MEEM
315 {XK_Arabic_noon, 0x0646}, // ARABIC LETTER NOON
316 {XK_Arabic_ha, 0x0647}, // ARABIC LETTER HEH
317 {XK_Arabic_waw, 0x0648}, // ARABIC LETTER WAW
318 {XK_Arabic_alefmaksura, 0x0649}, // ARABIC LETTER ALEF MAKSURA
319 {XK_Arabic_yeh, 0x064A}, // ARABIC LETTER YEH
320 {XK_Arabic_fathatan, 0x064B}, // ARABIC FATHATAN
321 {XK_Arabic_dammatan, 0x064C}, // ARABIC DAMMATAN
322 {XK_Arabic_kasratan, 0x064D}, // ARABIC KASRATAN
323 {XK_Arabic_fatha, 0x064E}, // ARABIC FATHA
324 {XK_Arabic_damma, 0x064F}, // ARABIC DAMMA
325 {XK_Arabic_kasra, 0x0650}, // ARABIC KASRA
326 {XK_Arabic_shadda, 0x0651}, // ARABIC SHADDA
327 {XK_Arabic_sukun, 0x0652}, // ARABIC SUKUN
329 // Cyrillic KeySyms partially map 1:1 to Unicode
330 {XK_Serbian_dje, 0x0452}, // CYRILLIC SMALL LETTER DJE
331 {XK_Macedonia_gje, 0x0453}, // CYRILLIC SMALL LETTER GJE
332 {XK_Cyrillic_io, 0x0451}, // CYRILLIC SMALL LETTER IO
333 {XK_Ukrainian_ie, 0x0454}, // CYRILLIC SMALL LETTER UKRAINIAN IE
334 {XK_Macedonia_dse, 0x0455}, // CYRILLIC SMALL LETTER DZE
335 {XK_Ukrainian_i, 0x0456}, // CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
336 {XK_Ukrainian_yi, 0x0457}, // CYRILLIC SMALL LETTER YI
337 {XK_Cyrillic_je, 0x0458}, // CYRILLIC SMALL LETTER JE
338 {XK_Cyrillic_lje, 0x0459}, // CYRILLIC SMALL LETTER LJE
339 {XK_Cyrillic_nje, 0x045A}, // CYRILLIC SMALL LETTER NJE
340 {XK_Serbian_tshe, 0x045B}, // CYRILLIC SMALL LETTER TSHE
341 {XK_Macedonia_kje, 0x045C}, // CYRILLIC SMALL LETTER KJE
342 {XK_Ukrainian_ghe_with_upturn, 0x0491}, // CYRILLIC SMALL LETTER GHE WITH UPTURN
343 {XK_Byelorussian_shortu, 0x045E}, // CYRILLIC SMALL LETTER SHORT U
344 {XK_Cyrillic_dzhe, 0x045F}, // CYRILLIC SMALL LETTER DZHE
345 {XK_numerosign, 0x2116}, // NUMERO SIGN
346 {XK_Serbian_DJE, 0x0402}, // CYRILLIC CAPITAL LETTER DJE
347 {XK_Macedonia_GJE, 0x0403}, // CYRILLIC CAPITAL LETTER GJE
348 {XK_Cyrillic_IO, 0x0401}, // CYRILLIC CAPITAL LETTER IO
349 {XK_Ukrainian_IE, 0x0404}, // CYRILLIC CAPITAL LETTER UKRAINIAN IE
350 {XK_Macedonia_DSE, 0x0405}, // CYRILLIC CAPITAL LETTER DZE
351 {XK_Ukrainian_I, 0x0406}, // CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
352 {XK_Ukrainian_YI, 0x0407}, // CYRILLIC CAPITAL LETTER YI
353 {XK_Cyrillic_JE, 0x0408}, // CYRILLIC CAPITAL LETTER JE
354 {XK_Cyrillic_LJE, 0x0409}, // CYRILLIC CAPITAL LETTER LJE
355 {XK_Cyrillic_NJE, 0x040A}, // CYRILLIC CAPITAL LETTER NJE
356 {XK_Serbian_TSHE, 0x040B}, // CYRILLIC CAPITAL LETTER TSHE
357 {XK_Macedonia_KJE, 0x040C}, // CYRILLIC CAPITAL LETTER KJE
358 {XK_Ukrainian_GHE_WITH_UPTURN, 0x0490}, // CYRILLIC CAPITAL LETTER GHE WITH UPTURN
359 {XK_Byelorussian_SHORTU, 0x040E}, // CYRILLIC CAPITAL LETTER SHORT U
360 {XK_Cyrillic_DZHE, 0x040F}, // CYRILLIC CAPITAL LETTER DZHE
361 {XK_Cyrillic_yu, 0x044E}, // CYRILLIC SMALL LETTER YU
362 {XK_Cyrillic_a, 0x0430}, // CYRILLIC SMALL LETTER A
363 {XK_Cyrillic_be, 0x0431}, // CYRILLIC SMALL LETTER BE
364 {XK_Cyrillic_tse, 0x0446}, // CYRILLIC SMALL LETTER TSE
365 {XK_Cyrillic_de, 0x0434}, // CYRILLIC SMALL LETTER DE
366 {XK_Cyrillic_ie, 0x0435}, // CYRILLIC SMALL LETTER IE
367 {XK_Cyrillic_ef, 0x0444}, // CYRILLIC SMALL LETTER EF
368 {XK_Cyrillic_ghe, 0x0433}, // CYRILLIC SMALL LETTER GHE
369 {XK_Cyrillic_ha, 0x0445}, // CYRILLIC SMALL LETTER HA
370 {XK_Cyrillic_i, 0x0438}, // CYRILLIC SMALL LETTER I
371 {XK_Cyrillic_shorti, 0x0439}, // CYRILLIC SMALL LETTER SHORT I
372 {XK_Cyrillic_ka, 0x043A}, // CYRILLIC SMALL LETTER KA
373 {XK_Cyrillic_el, 0x043B}, // CYRILLIC SMALL LETTER EL
374 {XK_Cyrillic_em, 0x043C}, // CYRILLIC SMALL LETTER EM
375 {XK_Cyrillic_en, 0x043D}, // CYRILLIC SMALL LETTER EN
376 {XK_Cyrillic_o, 0x043E}, // CYRILLIC SMALL LETTER O
377 {XK_Cyrillic_pe, 0x043F}, // CYRILLIC SMALL LETTER PE
378 {XK_Cyrillic_ya, 0x044F}, // CYRILLIC SMALL LETTER YA
379 {XK_Cyrillic_er, 0x0440}, // CYRILLIC SMALL LETTER ER
380 {XK_Cyrillic_es, 0x0441}, // CYRILLIC SMALL LETTER ES
381 {XK_Cyrillic_te, 0x0442}, // CYRILLIC SMALL LETTER TE
382 {XK_Cyrillic_u, 0x0443}, // CYRILLIC SMALL LETTER U
383 {XK_Cyrillic_zhe, 0x0436}, // CYRILLIC SMALL LETTER ZHE
384 {XK_Cyrillic_ve, 0x0432}, // CYRILLIC SMALL LETTER VE
385 {XK_Cyrillic_softsign, 0x044C}, // CYRILLIC SMALL LETTER SOFT SIGN
386 {XK_Cyrillic_yeru, 0x044B}, // CYRILLIC SMALL LETTER YERU
387 {XK_Cyrillic_ze, 0x0437}, // CYRILLIC SMALL LETTER ZE
388 {XK_Cyrillic_sha, 0x0448}, // CYRILLIC SMALL LETTER SHA
389 {XK_Cyrillic_e, 0x044D}, // CYRILLIC SMALL LETTER E
390 {XK_Cyrillic_shcha, 0x0449}, // CYRILLIC SMALL LETTER SHCHA
391 {XK_Cyrillic_che, 0x0447}, // CYRILLIC SMALL LETTER CHE
392 {XK_Cyrillic_hardsign, 0x044A}, // CYRILLIC SMALL LETTER HARD SIGN
393 {XK_Cyrillic_YU, 0x042E}, // CYRILLIC CAPITAL LETTER YU
394 {XK_Cyrillic_A, 0x0410}, // CYRILLIC CAPITAL LETTER A
395 {XK_Cyrillic_BE, 0x0411}, // CYRILLIC CAPITAL LETTER BE
396 {XK_Cyrillic_TSE, 0x0426}, // CYRILLIC CAPITAL LETTER TSE
397 {XK_Cyrillic_DE, 0x0414}, // CYRILLIC CAPITAL LETTER DE
398 {XK_Cyrillic_IE, 0x0415}, // CYRILLIC CAPITAL LETTER IE
399 {XK_Cyrillic_EF, 0x0424}, // CYRILLIC CAPITAL LETTER EF
400 {XK_Cyrillic_GHE, 0x0413}, // CYRILLIC CAPITAL LETTER GHE
401 {XK_Cyrillic_HA, 0x0425}, // CYRILLIC CAPITAL LETTER HA
402 {XK_Cyrillic_I, 0x0418}, // CYRILLIC CAPITAL LETTER I
403 {XK_Cyrillic_SHORTI, 0x0419}, // CYRILLIC CAPITAL LETTER SHORT I
404 {XK_Cyrillic_KA, 0x041A}, // CYRILLIC CAPITAL LETTER KA
405 {XK_Cyrillic_EL, 0x041B}, // CYRILLIC CAPITAL LETTER EL
406 {XK_Cyrillic_EM, 0x041C}, // CYRILLIC CAPITAL LETTER EM
407 {XK_Cyrillic_EN, 0x041D}, // CYRILLIC CAPITAL LETTER EN
408 {XK_Cyrillic_O, 0x041E}, // CYRILLIC CAPITAL LETTER O
409 {XK_Cyrillic_PE, 0x041F}, // CYRILLIC CAPITAL LETTER PE
410 {XK_Cyrillic_YA, 0x042F}, // CYRILLIC CAPITAL LETTER YA
411 {XK_Cyrillic_ER, 0x0420}, // CYRILLIC CAPITAL LETTER ER
412 {XK_Cyrillic_ES, 0x0421}, // CYRILLIC CAPITAL LETTER ES
413 {XK_Cyrillic_TE, 0x0422}, // CYRILLIC CAPITAL LETTER TE
414 {XK_Cyrillic_U, 0x0423}, // CYRILLIC CAPITAL LETTER U
415 {XK_Cyrillic_ZHE, 0x0416}, // CYRILLIC CAPITAL LETTER ZHE
416 {XK_Cyrillic_VE, 0x0412}, // CYRILLIC CAPITAL LETTER VE
417 {XK_Cyrillic_SOFTSIGN, 0x042C}, // CYRILLIC CAPITAL LETTER SOFT SIGN
418 {XK_Cyrillic_YERU, 0x042B}, // CYRILLIC CAPITAL LETTER YERU
419 {XK_Cyrillic_ZE, 0x0417}, // CYRILLIC CAPITAL LETTER ZE
420 {XK_Cyrillic_SHA, 0x0428}, // CYRILLIC CAPITAL LETTER SHA
421 {XK_Cyrillic_E, 0x042D}, // CYRILLIC CAPITAL LETTER E
422 {XK_Cyrillic_SHCHA, 0x0429}, // CYRILLIC CAPITAL LETTER SHCHA
423 {XK_Cyrillic_CHE, 0x0427}, // CYRILLIC CAPITAL LETTER CHE
424 {XK_Cyrillic_HARDSIGN, 0x042A}, // CYRILLIC CAPITAL LETTER HARD SIGN
426 // Greek
427 {XK_Greek_ALPHAaccent, 0x0386}, // GREEK CAPITAL LETTER ALPHA WITH TONOS
428 {XK_Greek_EPSILONaccent, 0x0388}, // GREEK CAPITAL LETTER EPSILON WITH TONOS
429 {XK_Greek_ETAaccent, 0x0389}, // GREEK CAPITAL LETTER ETA WITH TONOS
430 {XK_Greek_IOTAaccent, 0x038A}, // GREEK CAPITAL LETTER IOTA WITH TONOS
431 {XK_Greek_IOTAdieresis, 0x03AA}, // GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
432 {XK_Greek_OMICRONaccent, 0x038C}, // GREEK CAPITAL LETTER OMICRON WITH TONOS
433 {XK_Greek_UPSILONaccent, 0x038E}, // GREEK CAPITAL LETTER UPSILON WITH TONOS
434 {XK_Greek_UPSILONdieresis, 0x03AB}, // GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
435 {XK_Greek_OMEGAaccent, 0x038F}, // GREEK CAPITAL LETTER OMEGA WITH TONOS
436 {XK_Greek_accentdieresis, 0x0385}, // GREEK DIALYTIKA TONOS
437 {XK_Greek_horizbar, 0x2015}, // HORIZONTAL BAR
438 {XK_Greek_alphaaccent, 0x03AC}, // GREEK SMALL LETTER ALPHA WITH TONOS
439 {XK_Greek_epsilonaccent, 0x03AD}, // GREEK SMALL LETTER EPSILON WITH TONOS
440 {XK_Greek_etaaccent, 0x03AE}, // GREEK SMALL LETTER ETA WITH TONOS
441 {XK_Greek_iotaaccent, 0x03AF}, // GREEK SMALL LETTER IOTA WITH TONOS
442 {XK_Greek_iotadieresis, 0x03CA}, // GREEK SMALL LETTER IOTA WITH DIALYTIKA
443 {XK_Greek_iotaaccentdieresis, 0x0390}, // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
444 {XK_Greek_omicronaccent, 0x03CC}, // GREEK SMALL LETTER OMICRON WITH TONOS
445 {XK_Greek_upsilonaccent, 0x03CD}, // GREEK SMALL LETTER UPSILON WITH TONOS
446 {XK_Greek_upsilondieresis, 0x03CB}, // GREEK SMALL LETTER UPSILON WITH DIALYTIKA
447 {XK_Greek_upsilonaccentdieresis, 0x03B0}, // GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
448 {XK_Greek_omegaaccent, 0x03CE}, // GREEK SMALL LETTER OMEGA WITH TONOS
449 {XK_Greek_ALPHA, 0x0391}, // GREEK CAPITAL LETTER ALPHA
450 {XK_Greek_BETA, 0x0392}, // GREEK CAPITAL LETTER BETA
451 {XK_Greek_GAMMA, 0x0393}, // GREEK CAPITAL LETTER GAMMA
452 {XK_Greek_DELTA, 0x0394}, // GREEK CAPITAL LETTER DELTA
453 {XK_Greek_EPSILON, 0x0395}, // GREEK CAPITAL LETTER EPSILON
454 {XK_Greek_ZETA, 0x0396}, // GREEK CAPITAL LETTER ZETA
455 {XK_Greek_ETA, 0x0397}, // GREEK CAPITAL LETTER ETA
456 {XK_Greek_THETA, 0x0398}, // GREEK CAPITAL LETTER THETA
457 {XK_Greek_IOTA, 0x0399}, // GREEK CAPITAL LETTER IOTA
458 {XK_Greek_KAPPA, 0x039A}, // GREEK CAPITAL LETTER KAPPA
459 {XK_Greek_LAMDA, 0x039B}, // GREEK CAPITAL LETTER LAMDA
460 {XK_Greek_LAMBDA, 0x039B}, // GREEK CAPITAL LETTER LAMDA
461 {XK_Greek_MU, 0x039C}, // GREEK CAPITAL LETTER MU
462 {XK_Greek_NU, 0x039D}, // GREEK CAPITAL LETTER NU
463 {XK_Greek_XI, 0x039E}, // GREEK CAPITAL LETTER XI
464 {XK_Greek_OMICRON, 0x039F}, // GREEK CAPITAL LETTER OMICRON
465 {XK_Greek_PI, 0x03A0}, // GREEK CAPITAL LETTER PI
466 {XK_Greek_RHO, 0x03A1}, // GREEK CAPITAL LETTER RHO
467 {XK_Greek_SIGMA, 0x03A3}, // GREEK CAPITAL LETTER SIGMA
468 {XK_Greek_TAU, 0x03A4}, // GREEK CAPITAL LETTER TAU
469 {XK_Greek_UPSILON, 0x03A5}, // GREEK CAPITAL LETTER UPSILON
470 {XK_Greek_PHI, 0x03A6}, // GREEK CAPITAL LETTER PHI
471 {XK_Greek_CHI, 0x03A7}, // GREEK CAPITAL LETTER CHI
472 {XK_Greek_PSI, 0x03A8}, // GREEK CAPITAL LETTER PSI
473 {XK_Greek_OMEGA, 0x03A9}, // GREEK CAPITAL LETTER OMEGA
474 {XK_Greek_alpha, 0x03B1}, // GREEK SMALL LETTER ALPHA
475 {XK_Greek_beta, 0x03B2}, // GREEK SMALL LETTER BETA
476 {XK_Greek_gamma, 0x03B3}, // GREEK SMALL LETTER GAMMA
477 {XK_Greek_delta, 0x03B4}, // GREEK SMALL LETTER DELTA
478 {XK_Greek_epsilon, 0x03B5}, // GREEK SMALL LETTER EPSILON
479 {XK_Greek_zeta, 0x03B6}, // GREEK SMALL LETTER ZETA
480 {XK_Greek_eta, 0x03B7}, // GREEK SMALL LETTER ETA
481 {XK_Greek_theta, 0x03B8}, // GREEK SMALL LETTER THETA
482 {XK_Greek_iota, 0x03B9}, // GREEK SMALL LETTER IOTA
483 {XK_Greek_kappa, 0x03BA}, // GREEK SMALL LETTER KAPPA
484 {XK_Greek_lamda, 0x03BB}, // GREEK SMALL LETTER LAMDA
485 {XK_Greek_lambda, 0x03BB}, // GREEK SMALL LETTER LAMDA
486 {XK_Greek_mu, 0x03BC}, // GREEK SMALL LETTER MU
487 {XK_Greek_nu, 0x03BD}, // GREEK SMALL LETTER NU
488 {XK_Greek_xi, 0x03BE}, // GREEK SMALL LETTER XI
489 {XK_Greek_omicron, 0x03BF}, // GREEK SMALL LETTER OMICRON
490 {XK_Greek_pi, 0x03C0}, // GREEK SMALL LETTER PI
491 {XK_Greek_rho, 0x03C1}, // GREEK SMALL LETTER RHO
492 {XK_Greek_sigma, 0x03C3}, // GREEK SMALL LETTER SIGMA
493 {XK_Greek_finalsmallsigma, 0x03C2}, // GREEK SMALL LETTER FINAL SIGMA
494 {XK_Greek_tau, 0x03C4}, // GREEK SMALL LETTER TAU
495 {XK_Greek_upsilon, 0x03C5}, // GREEK SMALL LETTER UPSILON
496 {XK_Greek_phi, 0x03C6}, // GREEK SMALL LETTER PHI
497 {XK_Greek_chi, 0x03C7}, // GREEK SMALL LETTER CHI
498 {XK_Greek_psi, 0x03C8}, // GREEK SMALL LETTER PSI
499 {XK_Greek_omega, 0x03C9}, // GREEK SMALL LETTER OMEGA
501 // Technical
502 {XK_leftradical, 0x23B7}, // RADICAL SYMBOL BOTTOM
503 {XK_topleftradical, 0x250C}, // BOX DRAWINGS LIGHT DOWN AND RIGHT
504 {XK_horizconnector, 0x2500}, // BOX DRAWINGS LIGHT HORIZONTAL
505 {XK_topintegral, 0x2320}, // TOP HALF INTEGRAL
506 {XK_botintegral, 0x2321}, // BOTTOM HALF INTEGRAL
507 {XK_vertconnector, 0x2502}, // BOX DRAWINGS LIGHT VERTICAL
508 {XK_topleftsqbracket, 0x23A1}, // LEFT SQUARE BRACKET UPPER CORNER
509 {XK_botleftsqbracket, 0x23A3}, // LEFT SQUARE BRACKET LOWER CORNER
510 {XK_toprightsqbracket, 0x23A4}, // RIGHT SQUARE BRACKET UPPER CORNER
511 {XK_botrightsqbracket, 0x23A6}, // RIGHT SQUARE BRACKET LOWER CORNER
512 {XK_topleftparens, 0x239B}, // LEFT PARENTHESIS UPPER HOOK
513 {XK_botleftparens, 0x239D}, // LEFT PARENTHESIS LOWER HOOK
514 {XK_toprightparens, 0x239E}, // RIGHT PARENTHESIS UPPER HOOK
515 {XK_botrightparens, 0x23A0}, // RIGHT PARENTHESIS LOWER HOOK
516 {XK_leftmiddlecurlybrace, 0x23A8}, // LEFT CURLY BRACKET MIDDLE PIECE
517 {XK_rightmiddlecurlybrace, 0x23AC}, // RIGHT CURLY BRACKET MIDDLE PIECE
518 {XK_lessthanequal, 0x2264}, // LESS-THAN OR EQUAL TO
519 {XK_notequal, 0x2260}, // NOT EQUAL TO
520 {XK_greaterthanequal, 0x2265}, // GREATER-THAN OR EQUAL TO
521 {XK_integral, 0x222B}, // INTEGRAL
522 {XK_therefore, 0x2234}, // THEREFORE
523 {XK_variation, 0x221D}, // PROPORTIONAL TO
524 {XK_infinity, 0x221E}, // INFINITY
525 {XK_nabla, 0x2207}, // NABLA
526 {XK_approximate, 0x223C}, // TILDE OPERATOR
527 {XK_similarequal, 0x2243}, // ASYMPTOTICALLY EQUAL TO
528 {XK_ifonlyif, 0x21D4}, // LEFT RIGHT DOUBLE ARROW
529 {XK_implies, 0x21D2}, // RIGHTWARDS DOUBLE ARROW
530 {XK_identical, 0x2261}, // IDENTICAL TO
531 {XK_radical, 0x221A}, // SQUARE ROOT
532 {XK_includedin, 0x2282}, // SUBSET OF
533 {XK_includes, 0x2283}, // SUPERSET OF
534 {XK_intersection, 0x2229}, // INTERSECTION
535 {XK_union, 0x222A}, // UNION
536 {XK_logicaland, 0x2227}, // LOGICAL AND
537 {XK_logicalor, 0x2228}, // LOGICAL OR
538 {XK_partialderivative, 0x2202}, // PARTIAL DIFFERENTIAL
539 {XK_function, 0x0192}, // LATIN SMALL LETTER F WITH HOOK
540 {XK_leftarrow, 0x2190}, // LEFTWARDS ARROW
541 {XK_uparrow, 0x2191}, // UPWARDS ARROW
542 {XK_rightarrow, 0x2192}, // RIGHTWARDS ARROW
543 {XK_downarrow, 0x2193}, // DOWNWARDS ARROW
545 // Special
546 {XK_soliddiamond, 0x25C6}, // BLACK DIAMOND
547 {XK_checkerboard, 0x2592}, // MEDIUM SHADE
548 {XK_ht, 0x2409}, // SYMBOL FOR HORIZONTAL TABULATION
549 {XK_ff, 0x240C}, // SYMBOL FOR FORM FEED
550 {XK_cr, 0x240D}, // SYMBOL FOR CARRIAGE RETURN
551 {XK_lf, 0x240A}, // SYMBOL FOR LINE FEED
552 {XK_nl, 0x2424}, // SYMBOL FOR NEWLINE
553 {XK_vt, 0x240B}, // SYMBOL FOR VERTICAL TABULATION
554 {XK_lowrightcorner, 0x2518}, // BOX DRAWINGS LIGHT UP AND LEFT
555 {XK_uprightcorner, 0x2510}, // BOX DRAWINGS LIGHT DOWN AND LEFT
556 {XK_upleftcorner, 0x250C}, // BOX DRAWINGS LIGHT DOWN AND RIGHT
557 {XK_lowleftcorner, 0x2514}, // BOX DRAWINGS LIGHT UP AND RIGHT
558 {XK_crossinglines, 0x253C}, // BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
559 {XK_horizlinescan1, 0x23BA}, // HORIZONTAL SCAN LINE-1
560 {XK_horizlinescan3, 0x23BB}, // HORIZONTAL SCAN LINE-3
561 {XK_horizlinescan5, 0x2500}, // BOX DRAWINGS LIGHT HORIZONTAL
562 {XK_horizlinescan7, 0x23BC}, // HORIZONTAL SCAN LINE-7
563 {XK_horizlinescan9, 0x23BD}, // HORIZONTAL SCAN LINE-9
564 {XK_leftt, 0x251C}, // BOX DRAWINGS LIGHT VERTICAL AND RIGHT
565 {XK_rightt, 0x2524}, // BOX DRAWINGS LIGHT VERTICAL AND LEFT
566 {XK_bott, 0x2534}, // BOX DRAWINGS LIGHT UP AND HORIZONTAL
567 {XK_topt, 0x252C}, // BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
568 {XK_vertbar, 0x2502}, // BOX DRAWINGS LIGHT VERTICAL
570 // Publishing
571 {XK_emspace, 0x2003}, // EM SPACE
572 {XK_enspace, 0x2002}, // EN SPACE
573 {XK_em3space, 0x2004}, // THREE-PER-EM SPACE
574 {XK_em4space, 0x2005}, // FOUR-PER-EM SPACE
575 {XK_digitspace, 0x2007}, // FIGURE SPACE
576 {XK_punctspace, 0x2008}, // PUNCTUATION SPACE
577 {XK_thinspace, 0x2009}, // THIN SPACE
578 {XK_hairspace, 0x200A}, // HAIR SPACE
579 {XK_emdash, 0x2014}, // EM DASH
580 {XK_endash, 0x2013}, // EN DASH
581 {XK_signifblank, 0x2423}, // OPEN BOX
582 {XK_ellipsis, 0x2026}, // HORIZONTAL ELLIPSIS
583 {XK_doubbaselinedot, 0x2025}, // TWO DOT LEADER
584 {XK_onethird, 0x2153}, // VULGAR FRACTION ONE THIRD
585 {XK_twothirds, 0x2154}, // VULGAR FRACTION TWO THIRDS
586 {XK_onefifth, 0x2155}, // VULGAR FRACTION ONE FIFTH
587 {XK_twofifths, 0x2156}, // VULGAR FRACTION TWO FIFTHS
588 {XK_threefifths, 0x2157}, // VULGAR FRACTION THREE FIFTHS
589 {XK_fourfifths, 0x2158}, // VULGAR FRACTION FOUR FIFTHS
590 {XK_onesixth, 0x2159}, // VULGAR FRACTION ONE SIXTH
591 {XK_fivesixths, 0x215A}, // VULGAR FRACTION FIVE SIXTHS
592 {XK_careof, 0x2105}, // CARE OF
593 {XK_figdash, 0x2012}, // FIGURE DASH
594 {XK_leftanglebracket, 0x27E8}, // MATHEMATICAL LEFT ANGLE BRACKET
595 {XK_decimalpoint, 0x002E}, // FULL STOP
596 {XK_rightanglebracket, 0x27E9}, // MATHEMATICAL RIGHT ANGLE BRACKET
597 {XK_oneeighth, 0x215B}, // VULGAR FRACTION ONE EIGHTH
598 {XK_threeeighths, 0x215C}, // VULGAR FRACTION THREE EIGHTHS
599 {XK_fiveeighths, 0x215D}, // VULGAR FRACTION FIVE EIGHTHS
600 {XK_seveneighths, 0x215E}, // VULGAR FRACTION SEVEN EIGHTHS
601 {XK_trademark, 0x2122}, // TRADE MARK SIGN
602 {XK_signaturemark, 0x2613}, // SALTIRE
603 {XK_leftopentriangle, 0x25C1}, // WHITE LEFT-POINTING TRIANGLE
604 {XK_rightopentriangle, 0x25B7}, // WHITE RIGHT-POINTING TRIANGLE
605 {XK_emopencircle, 0x25CB}, // WHITE CIRCLE
606 {XK_emopenrectangle, 0x25AF}, // WHITE VERTICAL RECTANGLE
607 {XK_leftsinglequotemark, 0x2018}, // LEFT SINGLE QUOTATION MARK
608 {XK_rightsinglequotemark, 0x2019}, // RIGHT SINGLE QUOTATION MARK
609 {XK_leftdoublequotemark, 0x201C}, // LEFT DOUBLE QUOTATION MARK
610 {XK_rightdoublequotemark, 0x201D}, // RIGHT DOUBLE QUOTATION MARK
611 {XK_prescription, 0x211E}, // PRESCRIPTION TAKE
612 {XK_minutes, 0x2032}, // PRIME
613 {XK_seconds, 0x2033}, // DOUBLE PRIME
614 {XK_latincross, 0x271D}, // LATIN CROSS
615 {XK_filledrectbullet, 0x25AC}, // BLACK RECTANGLE
616 {XK_filledlefttribullet, 0x25C0}, // BLACK LEFT-POINTING TRIANGLE
617 {XK_filledrighttribullet, 0x25B6}, // BLACK RIGHT-POINTING TRIANGLE
618 {XK_emfilledcircle, 0x25CF}, // BLACK CIRCLE
619 {XK_emfilledrect, 0x25AE}, // BLACK VERTICAL RECTANGLE
620 {XK_enopencircbullet, 0x25E6}, // WHITE BULLET
621 {XK_enopensquarebullet, 0x25AB}, // WHITE SMALL SQUARE
622 {XK_openrectbullet, 0x25AD}, // WHITE RECTANGLE
623 {XK_opentribulletup, 0x25B3}, // WHITE UP-POINTING TRIANGLE
624 {XK_opentribulletdown, 0x25BD}, // WHITE DOWN-POINTING TRIANGLE
625 {XK_openstar, 0x2606}, // WHITE STAR
626 {XK_enfilledcircbullet, 0x2022}, // BULLET
627 {XK_enfilledsqbullet, 0x25AA}, // BLACK SMALL SQUARE
628 {XK_filledtribulletup, 0x25B2}, // BLACK UP-POINTING TRIANGLE
629 {XK_filledtribulletdown, 0x25BC}, // BLACK DOWN-POINTING TRIANGLE
630 {XK_leftpointer, 0x261C}, // WHITE LEFT POINTING INDEX
631 {XK_rightpointer, 0x261E}, // WHITE RIGHT POINTING INDEX
632 {XK_club, 0x2663}, // BLACK CLUB SUIT
633 {XK_diamond, 0x2666}, // BLACK DIAMOND SUIT
634 {XK_heart, 0x2665}, // BLACK HEART SUIT
635 {XK_maltesecross, 0x2720}, // MALTESE CROSS
636 {XK_dagger, 0x2020}, // DAGGER
637 {XK_doubledagger, 0x2021}, // DOUBLE DAGGER
638 {XK_checkmark, 0x2713}, // CHECK MARK
639 {XK_ballotcross, 0x2717}, // BALLOT X
640 {XK_musicalsharp, 0x266F}, // MUSIC SHARP SIGN
641 {XK_musicalflat, 0x266D}, // MUSIC FLAT SIGN
642 {XK_malesymbol, 0x2642}, // MALE SIGN
643 {XK_femalesymbol, 0x2640}, // FEMALE SIGN
644 {XK_telephone, 0x260E}, // BLACK TELEPHONE
645 {XK_telephonerecorder, 0x2315}, // TELEPHONE RECORDER
646 {XK_phonographcopyright, 0x2117}, // SOUND RECORDING COPYRIGHT
647 {XK_caret, 0x2038}, // CARET
648 {XK_singlelowquotemark, 0x201A}, // SINGLE LOW-9 QUOTATION MARK
649 {XK_doublelowquotemark, 0x201E}, // DOUBLE LOW-9 QUOTATION MARK
651 // APL
652 {XK_leftcaret, 0x003C}, // LESS-THAN SIGN
653 {XK_rightcaret, 0x003E}, // GREATER-THAN SIGN
654 {XK_downcaret, 0x2228}, // LOGICAL OR
655 {XK_upcaret, 0x2227}, // LOGICAL AND
656 {XK_overbar, 0x00AF}, // MACRON
657 {XK_downtack, 0x22A4}, // DOWN TACK
658 {XK_upshoe, 0x2229}, // INTERSECTION
659 {XK_downstile, 0x230A}, // LEFT FLOOR
660 {XK_underbar, 0x005F}, // LOW LINE
661 {XK_jot, 0x2218}, // RING OPERATOR
662 {XK_quad, 0x2395}, // APL FUNCTIONAL SYMBOL QUAD
663 {XK_uptack, 0x22A5}, // UP TACK
664 {XK_circle, 0x25CB}, // WHITE CIRCLE
665 {XK_upstile, 0x2308}, // LEFT CEILING
666 {XK_downshoe, 0x222A}, // UNION
667 {XK_rightshoe, 0x2283}, // SUPERSET OF
668 {XK_leftshoe, 0x2282}, // SUBSET OF
669 {XK_lefttack, 0x22A3}, // LEFT TACK
670 {XK_righttack, 0x22A2}, // RIGHT TACK
672 // Hebrew
673 {XK_hebrew_doublelowline, 0x2017}, // DOUBLE LOW LINE
674 {XK_hebrew_aleph, 0x05D0}, // HEBREW LETTER ALEF
675 {XK_hebrew_bet, 0x05D1}, // HEBREW LETTER BET
676 {XK_hebrew_gimel, 0x05D2}, // HEBREW LETTER GIMEL
677 {XK_hebrew_dalet, 0x05D3}, // HEBREW LETTER DALET
678 {XK_hebrew_he, 0x05D4}, // HEBREW LETTER HE
679 {XK_hebrew_waw, 0x05D5}, // HEBREW LETTER VAV
680 {XK_hebrew_zain, 0x05D6}, // HEBREW LETTER ZAYIN
681 {XK_hebrew_chet, 0x05D7}, // HEBREW LETTER HET
682 {XK_hebrew_tet, 0x05D8}, // HEBREW LETTER TET
683 {XK_hebrew_yod, 0x05D9}, // HEBREW LETTER YOD
684 {XK_hebrew_finalkaph, 0x05DA}, // HEBREW LETTER FINAL KAF
685 {XK_hebrew_kaph, 0x05DB}, // HEBREW LETTER KAF
686 {XK_hebrew_lamed, 0x05DC}, // HEBREW LETTER LAMED
687 {XK_hebrew_finalmem, 0x05DD}, // HEBREW LETTER FINAL MEM
688 {XK_hebrew_mem, 0x05DE}, // HEBREW LETTER MEM
689 {XK_hebrew_finalnun, 0x05DF}, // HEBREW LETTER FINAL NUN
690 {XK_hebrew_nun, 0x05E0}, // HEBREW LETTER NUN
691 {XK_hebrew_samech, 0x05E1}, // HEBREW LETTER SAMEKH
692 {XK_hebrew_ayin, 0x05E2}, // HEBREW LETTER AYIN
693 {XK_hebrew_finalpe, 0x05E3}, // HEBREW LETTER FINAL PE
694 {XK_hebrew_pe, 0x05E4}, // HEBREW LETTER PE
695 {XK_hebrew_finalzade, 0x05E5}, // HEBREW LETTER FINAL TSADI
696 {XK_hebrew_zade, 0x05E6}, // HEBREW LETTER TSADI
697 {XK_hebrew_qoph, 0x05E7}, // HEBREW LETTER QOF
698 {XK_hebrew_resh, 0x05E8}, // HEBREW LETTER RESH
699 {XK_hebrew_shin, 0x05E9}, // HEBREW LETTER SHIN
700 {XK_hebrew_taw, 0x05EA}, // HEBREW LETTER TAV
702 // Thai
703 {XK_Thai_kokai, 0x0E01}, // THAI CHARACTER KO KAI
704 {XK_Thai_khokhai, 0x0E02}, // THAI CHARACTER KHO KHAI
705 {XK_Thai_khokhuat, 0x0E03}, // THAI CHARACTER KHO KHUAT
706 {XK_Thai_khokhwai, 0x0E04}, // THAI CHARACTER KHO KHWAI
707 {XK_Thai_khokhon, 0x0E05}, // THAI CHARACTER KHO KHON
708 {XK_Thai_khorakhang, 0x0E06}, // THAI CHARACTER KHO RAKHANG
709 {XK_Thai_ngongu, 0x0E07}, // THAI CHARACTER NGO NGU
710 {XK_Thai_chochan, 0x0E08}, // THAI CHARACTER CHO CHAN
711 {XK_Thai_choching, 0x0E09}, // THAI CHARACTER CHO CHING
712 {XK_Thai_chochang, 0x0E0A}, // THAI CHARACTER CHO CHANG
713 {XK_Thai_soso, 0x0E0B}, // THAI CHARACTER SO SO
714 {XK_Thai_chochoe, 0x0E0C}, // THAI CHARACTER CHO CHOE
715 {XK_Thai_yoying, 0x0E0D}, // THAI CHARACTER YO YING
716 {XK_Thai_dochada, 0x0E0E}, // THAI CHARACTER DO CHADA
717 {XK_Thai_topatak, 0x0E0F}, // THAI CHARACTER TO PATAK
718 {XK_Thai_thothan, 0x0E10}, // THAI CHARACTER THO THAN
719 {XK_Thai_thonangmontho, 0x0E11}, // THAI CHARACTER THO NANGMONTHO
720 {XK_Thai_thophuthao, 0x0E12}, // THAI CHARACTER THO PHUTHAO
721 {XK_Thai_nonen, 0x0E13}, // THAI CHARACTER NO NEN
722 {XK_Thai_dodek, 0x0E14}, // THAI CHARACTER DO DEK
723 {XK_Thai_totao, 0x0E15}, // THAI CHARACTER TO TAO
724 {XK_Thai_thothung, 0x0E16}, // THAI CHARACTER THO THUNG
725 {XK_Thai_thothahan, 0x0E17}, // THAI CHARACTER THO THAHAN
726 {XK_Thai_thothong, 0x0E18}, // THAI CHARACTER THO THONG
727 {XK_Thai_nonu, 0x0E19}, // THAI CHARACTER NO NU
728 {XK_Thai_bobaimai, 0x0E1A}, // THAI CHARACTER BO BAIMAI
729 {XK_Thai_popla, 0x0E1B}, // THAI CHARACTER PO PLA
730 {XK_Thai_phophung, 0x0E1C}, // THAI CHARACTER PHO PHUNG
731 {XK_Thai_fofa, 0x0E1D}, // THAI CHARACTER FO FA
732 {XK_Thai_phophan, 0x0E1E}, // THAI CHARACTER PHO PHAN
733 {XK_Thai_fofan, 0x0E1F}, // THAI CHARACTER FO FAN
734 {XK_Thai_phosamphao, 0x0E20}, // THAI CHARACTER PHO SAMPHAO
735 {XK_Thai_moma, 0x0E21}, // THAI CHARACTER MO MA
736 {XK_Thai_yoyak, 0x0E22}, // THAI CHARACTER YO YAK
737 {XK_Thai_rorua, 0x0E23}, // THAI CHARACTER RO RUA
738 {XK_Thai_ru, 0x0E24}, // THAI CHARACTER RU
739 {XK_Thai_loling, 0x0E25}, // THAI CHARACTER LO LING
740 {XK_Thai_lu, 0x0E26}, // THAI CHARACTER LU
741 {XK_Thai_wowaen, 0x0E27}, // THAI CHARACTER WO WAEN
742 {XK_Thai_sosala, 0x0E28}, // THAI CHARACTER SO SALA
743 {XK_Thai_sorusi, 0x0E29}, // THAI CHARACTER SO RUSI
744 {XK_Thai_sosua, 0x0E2A}, // THAI CHARACTER SO SUA
745 {XK_Thai_hohip, 0x0E2B}, // THAI CHARACTER HO HIP
746 {XK_Thai_lochula, 0x0E2C}, // THAI CHARACTER LO CHULA
747 {XK_Thai_oang, 0x0E2D}, // THAI CHARACTER O ANG
748 {XK_Thai_honokhuk, 0x0E2E}, // THAI CHARACTER HO NOKHUK
749 {XK_Thai_paiyannoi, 0x0E2F}, // THAI CHARACTER PAIYANNOI
750 {XK_Thai_saraa, 0x0E30}, // THAI CHARACTER SARA A
751 {XK_Thai_maihanakat, 0x0E31}, // THAI CHARACTER MAI HAN-AKAT
752 {XK_Thai_saraaa, 0x0E32}, // THAI CHARACTER SARA AA
753 {XK_Thai_saraam, 0x0E33}, // THAI CHARACTER SARA AM
754 {XK_Thai_sarai, 0x0E34}, // THAI CHARACTER SARA I
755 {XK_Thai_saraii, 0x0E35}, // THAI CHARACTER SARA II
756 {XK_Thai_saraue, 0x0E36}, // THAI CHARACTER SARA UE
757 {XK_Thai_sarauee, 0x0E37}, // THAI CHARACTER SARA UEE
758 {XK_Thai_sarau, 0x0E38}, // THAI CHARACTER SARA U
759 {XK_Thai_sarauu, 0x0E39}, // THAI CHARACTER SARA UU
760 {XK_Thai_phinthu, 0x0E3A}, // THAI CHARACTER PHINTHU
761 {XK_Thai_baht, 0x0E3F}, // THAI CURRENCY SYMBOL BAHT
762 {XK_Thai_sarae, 0x0E40}, // THAI CHARACTER SARA E
763 {XK_Thai_saraae, 0x0E41}, // THAI CHARACTER SARA AE
764 {XK_Thai_sarao, 0x0E42}, // THAI CHARACTER SARA O
765 {XK_Thai_saraaimaimuan, 0x0E43}, // THAI CHARACTER SARA AI MAIMUAN
766 {XK_Thai_saraaimaimalai, 0x0E44}, // THAI CHARACTER SARA AI MAIMALAI
767 {XK_Thai_lakkhangyao, 0x0E45}, // THAI CHARACTER LAKKHANGYAO
768 {XK_Thai_maiyamok, 0x0E46}, // THAI CHARACTER MAIYAMOK
769 {XK_Thai_maitaikhu, 0x0E47}, // THAI CHARACTER MAITAIKHU
770 {XK_Thai_maiek, 0x0E48}, // THAI CHARACTER MAI EK
771 {XK_Thai_maitho, 0x0E49}, // THAI CHARACTER MAI THO
772 {XK_Thai_maitri, 0x0E4A}, // THAI CHARACTER MAI TRI
773 {XK_Thai_maichattawa, 0x0E4B}, // THAI CHARACTER MAI CHATTAWA
774 {XK_Thai_thanthakhat, 0x0E4C}, // THAI CHARACTER THANTHAKHAT
775 {XK_Thai_nikhahit, 0x0E4D}, // THAI CHARACTER NIKHAHIT
776 {XK_Thai_leksun, 0x0E50}, // THAI DIGIT ZERO
777 {XK_Thai_leknung, 0x0E51}, // THAI DIGIT ONE
778 {XK_Thai_leksong, 0x0E52}, // THAI DIGIT TWO
779 {XK_Thai_leksam, 0x0E53}, // THAI DIGIT THREE
780 {XK_Thai_leksi, 0x0E54}, // THAI DIGIT FOUR
781 {XK_Thai_lekha, 0x0E55}, // THAI DIGIT FIVE
782 {XK_Thai_lekhok, 0x0E56}, // THAI DIGIT SIX
783 {XK_Thai_lekchet, 0x0E57}, // THAI DIGIT SEVEN
784 {XK_Thai_lekpaet, 0x0E58}, // THAI DIGIT EIGHT
785 {XK_Thai_lekkao, 0x0E59}, // THAI DIGIT NINE
787 // Korean
788 {XK_Korean_Won, 0x20A9}, // WON SIGN
790 // Armenian KeySyms map 1:1 to Unicode
792 // Georgian KeySyms map 1:1 to Unicode
794 // Azeri KeySyms map 1:1 to Unicode
796 // Vietnamese KeySyms map 1:1 to Unicode
798 // Currency KeySyms partially map 1:1 to Unicode
799 {XK_EuroSign, 0x20AC}, // EURO SIGN
801 // Mathematical KeySyms map 1:1 to Unicode
803 // Braille KeySyms map 1:1 to Unicode
805 // Sinhala KeySyms map 1:1 to Unicode
807 // Dead keys mapped to Unicode combining characters (mostly) for composition,
808 // used in combination with the UI Events 'Dead' key. For the X KeySyms that
809 // have no combining accent, we use a character whose name has mnemonic value.
810 {XK_dead_grave, 0x0300}, // COMBINING GRAVE ACCENT
811 {XK_dead_acute, 0x0301}, // COMBINING ACUTE ACCENT
812 {XK_dead_circumflex, 0x0302}, // COMBINING CIRCUMFLEX ACCENT
813 {XK_dead_tilde, 0x0303}, // COMBINING TILDE
814 {XK_dead_macron, 0x0304}, // COMBINING MACRON
815 {XK_dead_breve, 0x0306}, // COMBINING BREVE
816 {XK_dead_abovedot, 0x0307}, // COMBINING DOT ABOVE
817 {XK_dead_diaeresis, 0x0308}, // COMBINING DIAERESIS
818 {XK_dead_abovering, 0x030A}, // COMBINING RING ABOVE
819 {XK_dead_doubleacute, 0x030B}, // COMBINING DOUBLE ACUTE ACCENT
820 {XK_dead_caron, 0x030C}, // COMBINING CARON
821 {XK_dead_cedilla, 0x0327}, // COMBINING CEDILLA
822 {XK_dead_ogonek, 0x0328}, // COMBINING OGONEK
823 {XK_dead_iota, 0x0345}, // COMBINING GREEK YPOGEGRAMMENI
824 {XK_dead_voiced_sound, 0x3099}, // COMB. KATAKANA-HIRAGANA VOICED
825 {XK_dead_semivoiced_sound, 0x309A}, // COMB. KATAKANA-HIRAGANA SEMI-VOICED
826 {XK_dead_belowdot, 0x0323}, // COMBINING DOT BELOW
827 {XK_dead_hook, 0x0309}, // COMBINING HOOK ABOVE
828 {XK_dead_horn, 0x031B}, // COMBINING HORN
829 {XK_dead_stroke, 0x0338}, // COMBINING LONG SOLIDUS OVERLAY
830 {XK_dead_abovecomma, 0x0313}, // COMBINING COMMA ABOVE
831 {XK_dead_abovereversedcomma, 0x0314}, // COMBINING REVERSED COMMA ABOVE
832 {XK_dead_doublegrave, 0x030F}, // COMBINING DOUBLE GRAVE ACCENT
833 {XK_dead_belowring, 0x0325}, // COMBINING RING BELOW
834 {XK_dead_belowmacron, 0x0331}, // COMBINING MACRON BELOW
835 {XK_dead_belowcircumflex, 0x032D}, // COMBINING CIRCUMFLEX ACCENT BELOW
836 {XK_dead_belowtilde, 0x0330}, // COMBINING TILDE BELOW
837 {XK_dead_belowbreve, 0x032E}, // COMBINING BREVE BELOW
838 {XK_dead_belowdiaeresis, 0x0324}, // COMBINING DIAERESIS BELOW
839 {XK_dead_invertedbreve, 0x0311}, // COMBINING INVERTED BREVE
840 {XK_dead_belowcomma, 0x0326}, // COMBINING COMMA BELOW
841 {XK_dead_currency, 0x00A4}, // CURRENCY SIGN
842 {XK_dead_greek, 0x037E}, // GREEK QUESTION MARK
845 class KeySymToUnicode {
846 public:
847 KeySymToUnicode()
848 : keysym_to_unicode_map_(arraysize(g_keysym_to_unicode_table)) {
849 for (size_t i = 0; i < arraysize(g_keysym_to_unicode_table); ++i) {
850 keysym_to_unicode_map_[g_keysym_to_unicode_table[i].keysym] =
851 g_keysym_to_unicode_table[i].unicode;
855 uint16_t UnicodeFromKeySym(KeySym keysym) const {
856 // Latin-1 characters have the same representation.
857 if ((0x0020 <= keysym && keysym <= 0x007e) ||
858 (0x00a0 <= keysym && keysym <= 0x00ff))
859 return static_cast<uint16_t>(keysym);
861 // Unicode-style KeySyms.
862 if ((keysym & 0xffe00000) == 0x01000000) {
863 uint32_t unicode = static_cast<uint32_t>(keysym & 0x1fffff);
864 if (unicode & ~0xffff)
865 return 0; // We don't support characters outside the Basic Plane.
866 return static_cast<uint16_t>(unicode);
869 // Other KeySyms which are not Unicode-style.
870 KeySymToUnicodeMap::const_iterator i =
871 keysym_to_unicode_map_.find(keysym);
872 return i != keysym_to_unicode_map_.end() ? i->second : 0;
875 private:
876 typedef std::unordered_map<KeySym, uint16_t> KeySymToUnicodeMap;
877 KeySymToUnicodeMap keysym_to_unicode_map_;
879 DISALLOW_COPY_AND_ASSIGN(KeySymToUnicode);
882 static base::LazyInstance<KeySymToUnicode>::Leaky g_keysym_to_unicode =
883 LAZY_INSTANCE_INITIALIZER;
885 uint16_t GetUnicodeCharacterFromXKeySym(unsigned long keysym) {
886 return g_keysym_to_unicode.Get().UnicodeFromKeySym(
887 static_cast<KeySym>(keysym));
890 } // namespace ui