2 * FreeRDP: A Remote Desktop Protocol Client
3 * XKB-based Keyboard Mapping to Microsoft Keyboard System
5 * Copyright 2009 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 /* Detection of plausible keyboard layout id based on current locale (LANG) setting. */
23 * Refer to "Windows XP/Server 2003 - List of Locale IDs, Input Locale, and Language Collection":
24 * http://www.microsoft.com/globaldev/reference/winxp/xp-lcid.mspx
30 #include <freerdp/api.h>
31 #include <freerdp/types.h>
33 #define AFRIKAANS 0x0436
34 #define ALBANIAN 0x041c
35 #define ALSATIAN 0x0484
36 #define AMHARIC 0x045E
37 #define ARABIC_SAUDI_ARABIA 0x0401
38 #define ARABIC_IRAQ 0x0801
39 #define ARABIC_EGYPT 0x0c01
40 #define ARABIC_LIBYA 0x1001
41 #define ARABIC_ALGERIA 0x1401
42 #define ARABIC_MOROCCO 0x1801
43 #define ARABIC_TUNISIA 0x1c01
44 #define ARABIC_OMAN 0x2001
45 #define ARABIC_YEMEN 0x2401
46 #define ARABIC_SYRIA 0x2801
47 #define ARABIC_JORDAN 0x2c01
48 #define ARABIC_LEBANON 0x3001
49 #define ARABIC_KUWAIT 0x3401
50 #define ARABIC_UAE 0x3801
51 #define ARABIC_BAHRAIN 0x3c01
52 #define ARABIC_QATAR 0x4001
53 #define ARMENIAN 0x042b
54 #define ASSAMESE 0x044D
55 #define AZERI_LATIN 0x042c
56 #define AZERI_CYRILLIC 0x082c
57 #define BASHKIR 0x046D
59 #define BELARUSIAN 0x0423
60 #define BENGALI_INDIA 0x0445
61 #define BOSNIAN_LATIN 0x141A
63 #define BULGARIAN 0x0402
64 #define CATALAN 0x0403
65 #define CHINESE_TAIWAN 0x0404
66 #define CHINESE_PRC 0x0804
67 #define CHINESE_HONG_KONG 0x0c04
68 #define CHINESE_SINGAPORE 0x1004
69 #define CHINESE_MACAU 0x1404
70 #define CROATIAN 0x041a
71 #define CROATIAN_BOSNIA_HERZEGOVINA 0x101A
76 #define DUTCH_STANDARD 0x0413
77 #define DUTCH_BELGIAN 0x0813
78 #define ENGLISH_UNITED_STATES 0x0409
79 #define ENGLISH_UNITED_KINGDOM 0x0809
80 #define ENGLISH_AUSTRALIAN 0x0c09
81 #define ENGLISH_CANADIAN 0x1009
82 #define ENGLISH_NEW_ZEALAND 0x1409
83 #define ENGLISH_INDIA 0x4009
84 #define ENGLISH_IRELAND 0x1809
85 #define ENGLISH_MALAYSIA 0x4409
86 #define ENGLISH_SOUTH_AFRICA 0x1c09
87 #define ENGLISH_JAMAICA 0x2009
88 #define ENGLISH_CARIBBEAN 0x2409
89 #define ENGLISH_BELIZE 0x2809
90 #define ENGLISH_TRINIDAD 0x2c09
91 #define ENGLISH_ZIMBABWE 0x3009
92 #define ENGLISH_PHILIPPINES 0x3409
93 #define ENGLISH_SINGAPORE 0x4809
94 #define ESTONIAN 0x0425
95 #define FAEROESE 0x0438
97 #define FILIPINO 0x0464
98 #define FINNISH 0x040b
99 #define FRENCH_STANDARD 0x040c
100 #define FRENCH_BELGIAN 0x080c
101 #define FRENCH_CANADIAN 0x0c0c
102 #define FRENCH_SWISS 0x100c
103 #define FRENCH_LUXEMBOURG 0x140c
104 #define FRENCH_MONACO 0x180c
105 #define FRISIAN 0x0462
106 #define GEORGIAN 0x0437
107 #define GALICIAN 0x0456
108 #define GERMAN_STANDARD 0x0407
109 #define GERMAN_SWISS 0x0807
110 #define GERMAN_AUSTRIAN 0x0c07
111 #define GERMAN_LUXEMBOURG 0x1007
112 #define GERMAN_LIECHTENSTEIN 0x1407
114 #define GREENLANDIC 0x046F
115 #define GUJARATI 0x0447
116 #define HEBREW 0x040d
118 #define HUNGARIAN 0x040e
119 #define ICELANDIC 0x040f
121 #define INDONESIAN 0x0421
123 #define ITALIAN_STANDARD 0x0410
124 #define ITALIAN_SWISS 0x0810
125 #define JAPANESE 0x0411
126 #define KANNADA 0x044b
127 #define KAZAKH 0x043f
130 #define KINYARWANDA 0x0487
131 #define KONKANI 0x0457
132 #define KOREAN 0x0412
133 #define KYRGYZ 0x0440
135 #define LATVIAN 0x0426
136 #define LITHUANIAN 0x0427
137 #define LOWER_SORBIAN 0x082E
138 #define LUXEMBOURGISH 0x046E
139 #define MACEDONIAN 0x042f
140 #define MALAY_MALAYSIA 0x043e
141 #define MALAY_BRUNEI_DARUSSALAM 0x083e
142 #define MALAYALAM 0x044c
143 #define MALTESE 0x043a
144 #define MAPUDUNGUN 0x047A
146 #define MARATHI 0x044e
147 #define MOHAWK 0x047C
148 #define MONGOLIAN 0x0450
149 #define NEPALI 0x0461
150 #define NORWEGIAN_BOKMAL 0x0414
151 #define NORWEGIAN_NYNORSK 0x0814
152 #define OCCITAN 0x0482
154 #define PASHTO 0x0463
155 #define POLISH 0x0415
156 #define PORTUGUESE_BRAZILIAN 0x0416
157 #define PORTUGUESE_STANDARD 0x0816
158 #define PUNJABI 0x0446
159 #define QUECHUA_BOLIVIA 0x046b
160 #define QUECHUA_ECUADOR 0x086b
161 #define QUECHUA_PERU 0x0c6b
162 #define ROMANIAN 0x0418
163 #define ROMANSH 0x0417
164 #define RUSSIAN 0x0419
165 #define SAMI_INARI 0x243b
166 #define SAMI_LULE_NORWAY 0x103b
167 #define SAMI_LULE_SWEDEN 0x143b
168 #define SAMI_NORTHERN_FINLAND 0x0c3b
169 #define SAMI_NORTHERN_NORWAY 0x043b
170 #define SAMI_NORTHERN_SWEDEN 0x083b
171 #define SAMI_SKOLT 0x203b
172 #define SAMI_SOUTHERN_NORWAY 0x183b
173 #define SAMI_SOUTHERN_SWEDEN 0x1c3b
174 #define SANSKRIT 0x044f
175 #define SERBIAN_LATIN 0x081a
176 #define SERBIAN_LATIN_BOSNIA_HERZEGOVINA 0x181a
177 #define SERBIAN_CYRILLIC 0x0c1a
178 #define SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA 0x1c1a
179 #define SESOTHO_SA_LEBOA 0x046C
180 #define SINHALA 0x045B
181 #define SLOVAK 0x041b
182 #define SLOVENIAN 0x0424
183 #define SPANISH_TRADITIONAL_SORT 0x040a
184 #define SPANISH_MEXICAN 0x080a
185 #define SPANISH_MODERN_SORT 0x0c0a
186 #define SPANISH_GUATEMALA 0x100a
187 #define SPANISH_COSTA_RICA 0x140a
188 #define SPANISH_PANAMA 0x180a
189 #define SPANISH_DOMINICAN_REPUBLIC 0x1c0a
190 #define SPANISH_VENEZUELA 0x200a
191 #define SPANISH_COLOMBIA 0x240a
192 #define SPANISH_PERU 0x280a
193 #define SPANISH_ARGENTINA 0x2c0a
194 #define SPANISH_ECUADOR 0x300a
195 #define SPANISH_CHILE 0x340a
196 #define SPANISH_UNITED_STATES 0x540A
197 #define SPANISH_URUGUAY 0x380a
198 #define SPANISH_PARAGUAY 0x3c0a
199 #define SPANISH_BOLIVIA 0x400a
200 #define SPANISH_EL_SALVADOR 0x440a
201 #define SPANISH_HONDURAS 0x480a
202 #define SPANISH_NICARAGUA 0x4c0a
203 #define SPANISH_PUERTO_RICO 0x500a
204 #define SWAHILI 0x0441
205 #define SWEDISH 0x041d
206 #define SWEDISH_FINLAND 0x081d
207 #define SYRIAC 0x045a
210 #define TELUGU 0x044a
212 #define TIBETAN_BHUTAN 0x0851
213 #define TIBETAN_PRC 0x0451
214 #define TSWANA 0x0432
215 #define UKRAINIAN 0x0422
216 #define TURKISH 0x041f
217 #define TURKMEN 0x0442
218 #define UIGHUR 0x0480
219 #define UPPER_SORBIAN 0x042E
221 #define URDU_INDIA 0x0820
222 #define UZBEK_LATIN 0x0443
223 #define UZBEK_CYRILLIC 0x0843
224 #define VIETNAMESE 0x042a
230 #define YORUBA 0x046A
235 Time zones, taken from Windows Server 2008
237 (GMT -12:00) International Date Line West
238 (GMT -11:00) Midway Island, Samoa
241 (GMT -08:00) Pacific Time (US & Canada)
242 (GMT -08:00) Tijuana, Baja California
244 (GMT -07:00) Chihuahua, La Paz, Mazatlan
245 (GMT -07:00) Mountain Time (US & Canada)
246 (GMT -06:00) Central America
247 (GMT -06:00) Central Time (US & Canada)
248 (GMT -06:00) Guadalajara, Mexico City, Monterrey
249 (GMT -06:00) Saskatchewan
250 (GMT -05:00) Bogota, Lima, Quito, Rio Branco
251 (GMT -05:00) Eastern Time (US & Canada)
252 (GMT -05:00) Indiana (East)
254 (GMT -04:00) Atlantic Time (Canada)
257 (GMT -04:00) Santiago
258 (GMT -03:30) Newfoundland
259 (GMT -03:00) Brasilia
260 (GMT -03:00) Buenos Aires
261 (GMT -03:00) Georgetown
262 (GMT -03:00) Greenland
263 (GMT -03:00) Montevideo
264 (GMT -02:00) Mid-Atlantic
266 (GMT -01:00) Cape Verde Is.
267 (GMT +00:00) Casablanca
268 (GMT +00:00) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London
269 (GMT +00:00) Monrovia, Reykjavik
270 (GMT +01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
271 (GMT +01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
272 (GMT +01:00) Brussels, Copenhagen, Madrid, Paris
273 (GMT +01:00) Sarajevo, Skopje, Warsaw, Zagreb
274 (GMT +01:00) West Central Africa
276 (GMT +02:00) Athens, Bucharest, Istanbul
279 (GMT +02:00) Harare, Pretoria
280 (GMT +02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
281 (GMT +02:00) Jerusalem
283 (GMT +02:00) Windhoek
285 (GMT +03:00) Kuwait, Riyadh
286 (GMT +03:00) Moscow, St. Petersburg, Volgograd
290 (GMT +04:00) Abu Dhabi, Muscat
292 (GMT +04:00) Port Louis
295 (GMT +05:00) Ekaterinburg
296 (GMT +05:00) Islamabad, Karachi
297 (GMT +05:00) Tashkent
298 (GMT +05:30) Chennai, Kolkata, Mumbai, New Delhi
299 (GMT +05:30) Sri Jayawardenepura
300 (GMT +05:45) Kathmandu
301 (GMT +06:00) Almaty, Novosibirsk
302 (GMT +06:00) Astana, Dhaka
303 (GMT +06:30) Yangon (Rangoon)
304 (GMT +07:00) Bangkok, Hanoi, Jakarta
305 (GMT +07:00) Krasnoyarsk
306 (GMT +08:00) Beijing, Chongqing, Hong Kong, Urumqi
307 (GMT +08:00) Irkutsk, Ulaan Bataar
308 (GMT +08:00) Kuala Lumpur, Singapore
311 (GMT +09:00) Osaka, Sapporo, Tokyo
314 (GMT +09:30) Adelaide
316 (GMT +10:00) Brisbane
317 (GMT +10:00) Canberra, Melbourne, Sydney
318 (GMT +10:00) Guam, Port Moresby
319 (GMT +10:00) Hobart, Vladivostok
320 (GMT +11:00) Magadan, Solomon Is., New Caledonia
321 (GMT +12:00) Auckland, Wellington
322 (GMT +12:00) Fiji, Kamchatka, Marshall Is.
323 (GMT +13:00) Nuku'alofa
326 FREERDP_API uint32 detect_keyboard_layout_from_locale();
328 #endif /* __LOCALES_H */