Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / ui / events / ozone / layout / xkb / xkb_keyboard_layout_engine_unittest.cc
blob87b4c55e89f5925ec6e10d1b03f5f757b2831539
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 "testing/gtest/include/gtest/gtest.h"
6 #include "ui/events/event_constants.h"
7 #include "ui/events/keycodes/dom3/dom_code.h"
8 #include "ui/events/keycodes/dom3/dom_key.h"
9 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
10 #include "ui/events/ozone/layout/layout_util.h"
11 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"
13 namespace ui {
15 namespace {
17 // This XkbKeyCodeConverter simply uses the numeric value of the DomCode.
18 class VkTestXkbKeyCodeConverter : public XkbKeyCodeConverter {
19 public:
20 VkTestXkbKeyCodeConverter() {
21 invalid_xkb_keycode_ = static_cast<xkb_keycode_t>(DomCode::NONE);
23 ~VkTestXkbKeyCodeConverter() override {}
24 xkb_keycode_t DomCodeToXkbKeyCode(DomCode dom_code) const override {
25 return static_cast<xkb_keycode_t>(dom_code);
29 // This mock XkbKeyboardLayoutEngine fakes a layout that succeeds only when the
30 // supplied keycode matches its |Entry|, in which case it supplies DomKey::NONE
31 // and a character that depends on the flags.
32 class VkTestXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine {
33 public:
34 struct Entry {
35 base::char16 plain_character;
36 base::char16 shift_character;
37 base::char16 altgr_character;
38 ui::DomCode dom_code;
39 ui::KeyboardCode key_code;
42 struct RuleNames {
43 std::string layout_name;
44 std::string layout;
45 std::string variant;
48 public:
49 VkTestXkbKeyboardLayoutEngine(const XkbKeyCodeConverter& keycode_converter)
50 : XkbKeyboardLayoutEngine(keycode_converter), entry_(nullptr) {
51 // For testing, use the same modifier values as ui::EventFlags.
52 static const int kTestFlags[] = {
53 EF_SHIFT_DOWN, EF_ALTGR_DOWN, EF_MOD3_DOWN};
54 xkb_flag_map_.clear();
55 xkb_flag_map_.resize(arraysize(kTestFlags));
56 for (size_t i = 0; i < arraysize(kTestFlags); ++i) {
57 XkbFlagMapEntry e = {kTestFlags[i], kTestFlags[i]};
58 xkb_flag_map_.push_back(e);
61 ~VkTestXkbKeyboardLayoutEngine() override {}
63 void SetEntry(const Entry* entry) { entry_ = entry; }
65 xkb_keysym_t CharacterToKeySym(base::char16 c) const {
66 return 0x01000000u + c;
69 KeyboardCode GetKeyboardCode(DomCode dom_code,
70 int flags,
71 base::char16 character) const {
72 KeyboardCode key_code = DifficultKeyboardCode(
73 dom_code, flags, key_code_converter_.DomCodeToXkbKeyCode(dom_code),
74 flags, CharacterToKeySym(character), DomKey::CHARACTER, character);
75 if (key_code == VKEY_UNKNOWN)
76 key_code = DomCodeToNonLocatedKeyboardCode(dom_code);
77 return key_code;
80 // XkbKeyboardLayoutEngine overrides:
81 bool XkbLookup(xkb_keycode_t xkb_keycode,
82 xkb_mod_mask_t xkb_flags,
83 xkb_keysym_t* xkb_keysym,
84 base::char16* character) const override {
85 if (!entry_ ||
86 (xkb_keycode != static_cast<xkb_keycode_t>(entry_->dom_code)))
87 return false;
88 if (xkb_flags & EF_ALTGR_DOWN)
89 *character = entry_->altgr_character;
90 else if (xkb_flags & EF_SHIFT_DOWN)
91 *character = entry_->shift_character;
92 else
93 *character = entry_->plain_character;
94 *xkb_keysym = CharacterToKeySym(*character);
95 return *character != 0;
98 private:
99 const Entry* entry_;
102 } // anonymous namespace
104 class XkbLayoutEngineVkTest : public testing::Test {
105 public:
106 XkbLayoutEngineVkTest() {}
107 ~XkbLayoutEngineVkTest() override {}
109 void SetUp() override {
110 KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(
111 make_scoped_ptr(new VkTestXkbKeyboardLayoutEngine(keycode_converter_)));
112 layout_engine_ = static_cast<VkTestXkbKeyboardLayoutEngine*>(
113 KeyboardLayoutEngineManager::GetKeyboardLayoutEngine());
115 void TearDown() override {}
117 protected:
118 VkTestXkbKeyCodeConverter keycode_converter_;
119 VkTestXkbKeyboardLayoutEngine* layout_engine_;
122 TEST_F(XkbLayoutEngineVkTest, KeyboardCodeForPrintable) {
123 // This table contains U+2460 CIRCLED DIGIT ONE, U+2461 CIRCLED DIGIT TWO,
124 // and DomCode::NONE where the result should not depend on those values.
125 static const VkTestXkbKeyboardLayoutEngine::Entry kVkeyTestCase[] = {
126 // Cases requiring mapping tables.
127 // exclamation mark, *, *
128 /* 0 */ {0x0021, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_1},
129 // exclamation mark, *, *
130 /* 1 */ {0x0021, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
131 // exclamation mark, *, *
132 /* 2 */ {0x0021, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_8},
133 // quotation mark, *, *
134 /* 3 */ {0x0022, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
135 // quotation mark, *, *
136 /* 4 */ {0x0022, 0x2460, 0x2461, DomCode::DIGIT3, VKEY_3},
137 // number sign, apostrophe, *
138 /* 5 */ {0x0023, 0x0027, 0x2461, DomCode::BACKSLASH, VKEY_OEM_2},
139 // number sign, tilde, unmapped
140 /* 6 */ {0x0023, 0x007E, 0x0000, DomCode::BACKSLASH, VKEY_OEM_7},
141 // number sign, *, *
142 /* 7 */ {0x0023, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_7},
143 // dollar sign, *, *
144 /* 8 */ {0x0024, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_8},
145 // dollar sign, *, *
146 /* 9 */ {0x0024, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_1},
147 // percent sign, *, *
148 /* 10 */ {0x0025, 0x2460, 0x2461, DomCode::NONE, VKEY_5},
149 // ampersand, *, *
150 /* 11 */ {0x0026, 0x2460, 0x2461, DomCode::NONE, VKEY_1},
151 // apostrophe, unmapped, *
152 /* 12 */ {0x0027, 0x0000, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
153 // apostrophe, quotation mark, unmapped
154 /* 13 */ {0x0027, 0x0022, 0x0000, DomCode::KEY_Z, VKEY_Z},
155 // apostrophe, quotation mark, R caron
156 /* 14 */ {0x0027, 0x0022, 0x0158, DomCode::KEY_Z, VKEY_OEM_7},
157 // apostrophe, quotation mark, *
158 /* 15 */ {0x0027, 0x0022, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_3},
159 // apostrophe, quotation mark, *
160 /* 16 */ {0x0027, 0x0022, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
161 // apostrophe, asterisk, unmapped
162 /* 17 */ {0x0027, 0x002A, 0x0000, DomCode::BACKSLASH, VKEY_OEM_2},
163 // apostrophe, asterisk, unmapped
164 /* 18 */ {0x0027, 0x002A, 0x0000, DomCode::EQUAL, VKEY_OEM_PLUS},
165 // apostrophe, asterisk, vulgar fraction one half
166 /* 19 */ {0x0027, 0x002A, 0x00BD, DomCode::BACKSLASH, VKEY_OEM_5},
167 // apostrophe, asterisk, L stroke
168 /* 20 */ {0x0027, 0x002A, 0x0141, DomCode::BACKSLASH, VKEY_OEM_2},
169 // apostrophe, question mark, unmapped
170 /* 21 */ {0x0027, 0x003F, 0x0000, DomCode::MINUS, VKEY_OEM_4},
171 // apostrophe, question mark, Y acute
172 /* 22 */ {0x0027, 0x003F, 0x00DD, DomCode::MINUS, VKEY_OEM_4},
173 // apostrophe, commercial at, unmapped
174 /* 23 */ {0x0027, 0x0040, 0x0000, DomCode::QUOTE, VKEY_OEM_3},
175 // apostrophe, middle dot, *
176 /* 24 */ {0x0027, 0x00B7, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_5},
177 // apostrophe, *, *
178 /* 25 */ {0x0027, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_1},
179 // apostrophe, *, *
180 /* 26 */ {0x0027, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
181 // apostrophe, *, *
182 /* 27 */ {0x0027, 0x2460, 0x2461, DomCode::KEY_Q, VKEY_OEM_7},
183 // apostrophe, *, *
184 /* 28 */ {0x0027, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_7},
185 // left parenthesis, *, *
186 /* 29 */ {0x0028, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
187 // left parenthesis, *, *
188 /* 30 */ {0x0028, 0x2460, 0x2461, DomCode::DIGIT5, VKEY_5},
189 // left parenthesis, *, *
190 /* 31 */ {0x0028, 0x2460, 0x2461, DomCode::DIGIT9, VKEY_9},
191 // right parenthesis, *, *
192 /* 32 */ {0x0029, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
193 // right parenthesis, *, *
194 /* 33 */ {0x0029, 0x2460, 0x2461, DomCode::DIGIT0, VKEY_0},
195 // right parenthesis, *, *
196 /* 34 */ {0x0029, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_4},
197 // asterisk, *, *
198 /* 35 */ {0x002A, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
199 // asterisk, *, *
200 /* 36 */ {0x002A, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_1},
201 // plus sign, question mark, unmapped
202 /* 37 */ {0x002B, 0x003F, 0x0000, DomCode::MINUS, VKEY_OEM_PLUS},
203 // plus sign, question mark, reverse solidus
204 /* 38 */ {0x002B, 0x003F, 0x005C, DomCode::MINUS, VKEY_OEM_MINUS},
205 // plus sign, question mark, o double acute
206 /* 39 */ {0x002B, 0x003F, 0x0151, DomCode::MINUS, VKEY_OEM_PLUS},
207 // plus sign, *, *
208 /* 40 */ {0x002B, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_2},
209 // plus sign, *, *
210 /* 41 */ {0x002B, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_PLUS},
211 // plus sign, *, *
212 /* 42 */ {0x002B, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_PLUS},
213 // plus sign, *, *
214 /* 43 */ {0x002B, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_1},
215 // plus sign, *, *
216 /* 44 */ {0x002B, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_PLUS},
217 // plus sign, *, *
218 /* 45 */ {0x002B, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_PLUS},
219 // comma, *, *
220 /* 46 */ {0x002C, 0x2460, 0x2461, DomCode::COMMA, VKEY_OEM_COMMA},
221 // comma, *, *
222 /* 47 */ {0x002C, 0x2460, 0x2461, DomCode::DIGIT3, VKEY_3},
223 // comma, *, *
224 /* 48 */ {0x002C, 0x2460, 0x2461, DomCode::DIGIT5, VKEY_5},
225 // comma, *, *
226 /* 49 */ {0x002C, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
227 // comma, *, *
228 /* 50 */ {0x002C, 0x2460, 0x2461, DomCode::DIGIT9, VKEY_9},
229 // comma, *, *
230 /* 51 */ {0x002C, 0x2460, 0x2461, DomCode::KEY_M, VKEY_OEM_COMMA},
231 // comma, *, *
232 /* 52 */ {0x002C, 0x2460, 0x2461, DomCode::KEY_V, VKEY_OEM_COMMA},
233 // comma, *, *
234 /* 53 */ {0x002C, 0x2460, 0x2461, DomCode::KEY_W, VKEY_OEM_COMMA},
235 // hyphen-minus, equals sign, *
236 /* 54 */ {0x002D, 0x003D, 0x2461, DomCode::SLASH, VKEY_OEM_MINUS},
237 // hyphen-minus, low line, unmapped
238 /* 55 */ {0x002D, 0x005F, 0x0000, DomCode::EQUAL, VKEY_OEM_MINUS},
239 // hyphen-minus, low line, unmapped
240 /* 56 */ {0x002D, 0x005F, 0x0000, DomCode::SLASH, VKEY_OEM_MINUS},
241 // hyphen-minus, low line, asterisk
242 /* 57 */ {0x002D, 0x005F, 0x002A, DomCode::SLASH, VKEY_OEM_MINUS},
243 // hyphen-minus, low line, solidus
244 /* 58 */ {0x002D, 0x005F, 0x002F, DomCode::SLASH, VKEY_OEM_2},
245 // hyphen-minus, low line, n
246 /* 59 */ {0x002D, 0x005F, 0x006E, DomCode::SLASH, VKEY_OEM_MINUS},
247 // hyphen-minus, low line, r cedilla
248 /* 60 */ {0x002D, 0x005F, 0x0157, DomCode::EQUAL, VKEY_OEM_4},
249 // hyphen-minus, *, *
250 /* 61 */ {0x002D, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
251 // hyphen-minus, *, *
252 /* 62 */ {0x002D, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
253 // hyphen-minus, *, *
254 /* 63 */ {0x002D, 0x2460, 0x2461, DomCode::KEY_A, VKEY_OEM_MINUS},
255 // hyphen-minus, *, *
256 /* 64 */ {0x002D, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_MINUS},
257 // hyphen-minus, *, *
258 /* 65 */ {0x002D, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_MINUS},
259 // full stop, *, *
260 /* 66 */ {0x002E, 0x2460, 0x2461, DomCode::DIGIT7, VKEY_7},
261 // full stop, *, *
262 /* 67 */ {0x002E, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
263 // full stop, *, *
264 /* 68 */ {0x002E, 0x2460, 0x2461, DomCode::KEY_E, VKEY_OEM_PERIOD},
265 // full stop, *, *
266 /* 69 */ {0x002E, 0x2460, 0x2461, DomCode::KEY_O, VKEY_OEM_PERIOD},
267 // full stop, *, *
268 /* 70 */ {0x002E, 0x2460, 0x2461, DomCode::KEY_R, VKEY_OEM_PERIOD},
269 // full stop, *, *
270 /* 71 */ {0x002E, 0x2460, 0x2461, DomCode::PERIOD, VKEY_OEM_PERIOD},
271 // full stop, *, *
272 /* 72 */ {0x002E, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
273 // full stop, *, *
274 /* 73 */ {0x002E, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_2},
275 // solidus, digit zero, *
276 /* 74 */ {0x002F, 0x0030, 0x2461, DomCode::DIGIT0, VKEY_0},
277 // solidus, digit three, *
278 /* 75 */ {0x002F, 0x0033, 0x2461, DomCode::DIGIT3, VKEY_3},
279 // solidus, question mark, *
280 /* 76 */ {0x002F, 0x003F, 0x2461, DomCode::DIGIT0, VKEY_OEM_2},
281 // solidus, question mark, *
282 /* 77 */ {0x002F, 0x003F, 0x2461, DomCode::DIGIT3, VKEY_OEM_2},
283 // solidus, *, *
284 /* 78 */ {0x002F, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_7},
285 // solidus, *, *
286 /* 79 */ {0x002F, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
287 // solidus, *, *
288 /* 80 */ {0x002F, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_2},
289 // solidus, *, *
290 /* 81 */ {0x002F, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_4},
291 // solidus, *, *
292 /* 82 */ {0x002F, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_2},
293 // colon, *, *
294 /* 83 */ {0x003A, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_1},
295 // colon, *, *
296 /* 84 */ {0x003A, 0x2460, 0x2461, DomCode::DIGIT5, VKEY_5},
297 // colon, *, *
298 /* 85 */ {0x003A, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
299 // colon, *, *
300 /* 86 */ {0x003A, 0x2460, 0x2461, DomCode::PERIOD, VKEY_OEM_2},
301 // semicolon, *, *
302 /* 87 */ {0x003B, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_3},
303 // semicolon, *, *
304 /* 88 */ {0x003B, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_1},
305 // semicolon, *, *
306 /* 89 */ {0x003B, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
307 // semicolon, *, *
308 /* 90 */ {0x003B, 0x2460, 0x2461, DomCode::COMMA, VKEY_OEM_PERIOD},
309 // semicolon, *, *
310 /* 91 */ {0x003B, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
311 // semicolon, *, *
312 /* 92 */ {0x003B, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
313 // semicolon, *, *
314 /* 93 */ {0x003B, 0x2460, 0x2461, DomCode::KEY_Q, VKEY_OEM_1},
315 // semicolon, *, *
316 /* 94 */ {0x003B, 0x2460, 0x2461, DomCode::KEY_Z, VKEY_OEM_1},
317 // semicolon, *, *
318 /* 95 */ {0x003B, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
319 // semicolon, *, *
320 /* 96 */ {0x003B, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_2},
321 // less-than sign, *, *
322 /* 97 */ {0x003C, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
323 // equals sign, percent sign, unmapped
324 /* 98 */ {0x003D, 0x0025, 0x0000, DomCode::MINUS, VKEY_OEM_PLUS},
325 // equals sign, percent sign, hyphen-minus
326 /* 99 */ {0x003D, 0x0025, 0x002D, DomCode::MINUS, VKEY_OEM_MINUS},
327 // equals sign, percent sign, *
328 /* 100 */ {0x003D, 0x0025, 0x2461, DomCode::SLASH, VKEY_OEM_8},
329 // equals sign, plus sign, *
330 /* 101 */ {0x003D, 0x002B, 0x2461, DomCode::SLASH, VKEY_OEM_PLUS},
331 // equals sign, *, *
332 /* 102 */ {0x003D, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_PLUS},
333 // equals sign, *, *
334 /* 103 */ {0x003D, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
335 // equals sign, *, *
336 /* 104 */ {0x003D, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_PLUS},
337 // question mark, *, *
338 /* 105 */ {0x003F, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
339 // question mark, *, *
340 /* 106 */ {0x003F, 0x2460, 0x2461, DomCode::DIGIT7, VKEY_7},
341 // question mark, *, *
342 /* 107 */ {0x003F, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
343 // question mark, *, *
344 /* 108 */ {0x003F, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_PLUS},
345 // commercial at, *, *
346 /* 109 */ {0x0040, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_7},
347 // commercial at, *, *
348 /* 110 */ {0x0040, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
349 // left square bracket, *, *
350 /* 111 */ {0x005B, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
351 // left square bracket, *, *
352 /* 112 */ {0x005B, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
353 // left square bracket, *, *
354 /* 113 */ {0x005B, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_OEM_4},
355 // left square bracket, *, *
356 /* 114 */ {0x005B, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_4},
357 // left square bracket, *, *
358 /* 115 */ {0x005B, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
359 // reverse solidus, solidus, *
360 /* 116 */ {0x005C, 0x002F, 0x2461, DomCode::BACKSLASH, VKEY_OEM_7},
361 // reverse solidus, vertical line, digit one
362 /* 117 */ {0x005C, 0x007C, 0x0031, DomCode::BACKQUOTE, VKEY_OEM_5},
363 // reverse solidus, vertical line, N cedilla
364 /* 118 */ {0x005C, 0x007C, 0x0145, DomCode::BACKQUOTE, VKEY_OEM_3},
365 // reverse solidus, vertical line, *
366 /* 119 */ {0x005C, 0x007C, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
367 // reverse solidus, *, *
368 /* 120 */ {0x005C, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_4},
369 // right square bracket, *, *
370 /* 121 */ {0x005D, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_3},
371 // right square bracket, *, *
372 /* 122 */ {0x005D, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
373 // right square bracket, *, *
374 /* 123 */ {0x005D, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
375 // right square bracket, *, *
376 /* 124 */ {0x005D, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_OEM_6},
377 // right square bracket, *, *
378 /* 125 */ {0x005D, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_6},
379 // low line, *, *
380 /* 126 */ {0x005F, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
381 // low line, *, *
382 /* 127 */ {0x005F, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_MINUS},
383 // grave accent, unmapped, *
384 /* 128 */ {0x0060, 0x0000, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_3},
385 // grave accent, tilde, unmapped
386 /* 129 */ {0x0060, 0x007E, 0x0000, DomCode::BACKQUOTE, VKEY_OEM_3},
387 // grave accent, tilde, digit one
388 /* 130 */ {0x0060, 0x007E, 0x0031, DomCode::BACKQUOTE, VKEY_OEM_3},
389 // grave accent, tilde, semicolon
390 /* 131 */ {0x0060, 0x007E, 0x003B, DomCode::BACKQUOTE, VKEY_OEM_3},
391 // grave accent, tilde, grave accent
392 /* 132 */ {0x0060, 0x007E, 0x0060, DomCode::BACKQUOTE, VKEY_OEM_3},
393 // grave accent, tilde, inverted question mark
394 /* 133 */ {0x0060, 0x007E, 0x00BF, DomCode::BACKQUOTE, VKEY_OEM_3},
395 // grave accent, tilde, o double acute
396 /* 134 */ {0x0060, 0x007E, 0x0151, DomCode::BACKQUOTE, VKEY_OEM_3},
397 // grave accent, not sign, *
398 /* 135 */ {0x0060, 0x00AC, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_8},
399 // left curly bracket, *, *
400 /* 136 */ {0x007B, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_7},
401 // vertical line, *, *
402 /* 137 */ {0x007C, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
403 // right curly bracket, *, *
404 /* 138 */ {0x007D, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_2},
405 // tilde, *, *
406 /* 139 */ {0x007E, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
407 // inverted exclamation mark, *, *
408 /* 140 */ {0x00A1, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
409 // section sign, degree sign, *
410 /* 141 */ {0x00A7, 0x00B0, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_2},
411 // section sign, vulgar fraction one half, *
412 /* 142 */ {0x00A7, 0x00BD, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_5},
413 // section sign, *, *
414 /* 143 */ {0x00A7, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
415 // section sign, *, *
416 /* 144 */ {0x00A7, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
417 // section sign, *, *
418 /* 145 */ {0x00A7, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
419 // left-pointing double angle quotation mark, *, *
420 /* 146 */ {0x00AB, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
421 // left-pointing double angle quotation mark, *, *
422 /* 147 */ {0x00AB, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_6},
423 // soft hyphen, *, *
424 /* 148 */ {0x00AD, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_3},
425 // degree sign, *, *
426 /* 149 */ {0x00B0, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_7},
427 // degree sign, *, *
428 /* 150 */ {0x00B0, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_2},
429 // superscript two, *, *
430 /* 151 */ {0x00B2, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_7},
431 // micro sign, *, *
432 /* 152 */ {0x00B5, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
433 // masculine ordinal indicator, *, *
434 /* 153 */ {0x00BA, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_OEM_5},
435 // masculine ordinal indicator, *, *
436 /* 154 */ {0x00BA, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
437 // right-pointing double angle quotation mark, *, *
438 /* 155 */ {0x00BB, 0x2460, 0x2461, DomCode::NONE, VKEY_9},
439 // vulgar fraction one half, *, *
440 /* 156 */ {0x00BD, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
441 // inverted question mark, *, *
442 /* 157 */ {0x00BF, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
443 // sharp s, *, *
444 /* 158 */ {0x00DF, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
445 // a grave, degree sign, *
446 /* 159 */ {0x00E0, 0x00B0, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
447 // a grave, a diaeresis, *
448 /* 160 */ {0x00E0, 0x00E4, 0x2461, DomCode::QUOTE, VKEY_OEM_5},
449 // a grave, *, *
450 /* 161 */ {0x00E0, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
451 // a grave, *, *
452 /* 162 */ {0x00E0, 0x2460, 0x2461, DomCode::DIGIT0, VKEY_0},
453 // a acute, *, *
454 /* 163 */ {0x00E1, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
455 // a acute, *, *
456 /* 164 */ {0x00E1, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
457 // a circumflex, *, *
458 /* 165 */ {0x00E2, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
459 // a circumflex, *, *
460 /* 166 */ {0x00E2, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
461 // a diaeresis, A diaeresis, unmapped
462 /* 167 */ {0x00E4, 0x00C4, 0x0000, DomCode::QUOTE, VKEY_OEM_7},
463 // a diaeresis, A diaeresis, r caron
464 /* 168 */ {0x00E4, 0x00C4, 0x0159, DomCode::QUOTE, VKEY_OEM_7},
465 // a diaeresis, A diaeresis, S acute
466 /* 169 */ {0x00E4, 0x00C4, 0x015A, DomCode::QUOTE, VKEY_OEM_7},
467 // a diaeresis, a grave, *
468 /* 170 */ {0x00E4, 0x00E0, 0x2461, DomCode::QUOTE, VKEY_OEM_5},
469 // a diaeresis, *, *
470 /* 171 */ {0x00E4, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
471 // a ring above, *, *
472 /* 172 */ {0x00E5, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
473 // ae, *, *
474 /* 173 */ {0x00E6, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
475 // ae, *, *
476 /* 174 */ {0x00E6, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_3},
477 // c cedilla, C cedilla, unmapped
478 /* 175 */ {0x00E7, 0x00C7, 0x0000, DomCode::SEMICOLON, VKEY_OEM_1},
479 // c cedilla, C cedilla, Thorn
480 /* 176 */ {0x00E7, 0x00C7, 0x00DE, DomCode::SEMICOLON, VKEY_OEM_3},
481 // c cedilla, *, *
482 /* 177 */ {0x00E7, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_2},
483 // c cedilla, *, *
484 /* 178 */ {0x00E7, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
485 // c cedilla, *, *
486 /* 179 */ {0x00E7, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
487 // c cedilla, *, *
488 /* 180 */ {0x00E7, 0x2460, 0x2461, DomCode::COMMA, VKEY_OEM_COMMA},
489 // c cedilla, *, *
490 /* 181 */ {0x00E7, 0x2460, 0x2461, DomCode::DIGIT9, VKEY_9},
491 // c cedilla, *, *
492 /* 182 */ {0x00E7, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
493 // e grave, *, *
494 /* 183 */ {0x00E8, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_1},
495 // e grave, *, *
496 /* 184 */ {0x00E8, 0x2460, 0x2461, DomCode::DIGIT7, VKEY_7},
497 // e grave, *, *
498 /* 185 */ {0x00E8, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_3},
499 // e acute, E acute, *
500 /* 186 */ {0x00E9, 0x00C9, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
501 // e acute, o diaeresis, *
502 /* 187 */ {0x00E9, 0x00F6, 0x2461, DomCode::SEMICOLON, VKEY_OEM_7},
503 // e acute, *, *
504 /* 188 */ {0x00E9, 0x2460, 0x2461, DomCode::DIGIT0, VKEY_0},
505 // e acute, *, *
506 /* 189 */ {0x00E9, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
507 // e acute, *, *
508 /* 190 */ {0x00E9, 0x2460, 0x2461, DomCode::SLASH, VKEY_OEM_2},
509 // e circumflex, *, *
510 /* 191 */ {0x00EA, 0x2460, 0x2461, DomCode::NONE, VKEY_3},
511 // e diaeresis, *, *
512 /* 192 */ {0x00EB, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_1},
513 // i grave, *, *
514 /* 193 */ {0x00EC, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
515 // i acute, *, *
516 /* 194 */ {0x00ED, 0x2460, 0x2461, DomCode::BACKQUOTE, VKEY_0},
517 // i acute, *, *
518 /* 195 */ {0x00ED, 0x2460, 0x2461, DomCode::DIGIT9, VKEY_9},
519 // i circumflex, *, *
520 /* 196 */ {0x00EE, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
521 // eth, *, *
522 /* 197 */ {0x00F0, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_6},
523 // eth, *, *
524 /* 198 */ {0x00F0, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_1},
525 // n tilde, *, *
526 /* 199 */ {0x00F1, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_3},
527 // o grave, *, *
528 /* 200 */ {0x00F2, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_3},
529 // o acute, *, *
530 /* 201 */ {0x00F3, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
531 // o acute, *, *
532 /* 202 */ {0x00F3, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_PLUS},
533 // o circumflex, *, *
534 /* 203 */ {0x00F4, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
535 // o circumflex, *, *
536 /* 204 */ {0x00F4, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
537 // o tilde, *, *
538 /* 205 */ {0x00F5, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
539 // o diaeresis, O diaeresis, unmapped
540 /* 206 */ {0x00F6, 0x00D6, 0x0000, DomCode::SEMICOLON, VKEY_OEM_3},
541 // o diaeresis, O diaeresis, T cedilla
542 /* 207 */ {0x00F6, 0x00D6, 0x0162, DomCode::SEMICOLON, VKEY_OEM_3},
543 // o diaeresis, e acute, *
544 /* 208 */ {0x00F6, 0x00E9, 0x2461, DomCode::SEMICOLON, VKEY_OEM_7},
545 // o diaeresis, *, *
546 /* 209 */ {0x00F6, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
547 // o diaeresis, *, *
548 /* 210 */ {0x00F6, 0x2460, 0x2461, DomCode::DIGIT0, VKEY_OEM_3},
549 // o diaeresis, *, *
550 /* 211 */ {0x00F6, 0x2460, 0x2461, DomCode::MINUS, VKEY_OEM_PLUS},
551 // division sign, *, *
552 /* 212 */ {0x00F7, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
553 // o stroke, *, *
554 /* 213 */ {0x00F8, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
555 // o stroke, *, *
556 /* 214 */ {0x00F8, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_3},
557 // u grave, *, *
558 /* 215 */ {0x00F9, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_2},
559 // u grave, *, *
560 /* 216 */ {0x00F9, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_3},
561 // u acute, *, *
562 /* 217 */ {0x00FA, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
563 // u acute, *, *
564 /* 218 */ {0x00FA, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
565 // u diaeresis, U diaeresis, unmapped
566 /* 219 */ {0x00FC, 0x00DC, 0x0000, DomCode::BRACKET_LEFT, VKEY_OEM_1},
567 // u diaeresis, U diaeresis, unmapped
568 /* 220 */ {0x00FC, 0x00DC, 0x0000, DomCode::MINUS, VKEY_OEM_2},
569 // u diaeresis, U diaeresis, L stroke
570 /* 221 */ {0x00FC, 0x00DC, 0x0141, DomCode::BRACKET_LEFT, VKEY_OEM_3},
571 // u diaeresis, e grave, *
572 /* 222 */ {0x00FC, 0x00E8, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_1},
573 // u diaeresis, *, *
574 /* 223 */ {0x00FC, 0x2460, 0x2461, DomCode::KEY_W, VKEY_W},
575 // y acute, *, *
576 /* 224 */ {0x00FD, 0x2460, 0x2461, DomCode::NONE, VKEY_7},
577 // thorn, *, *
578 /* 225 */ {0x00FE, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_MINUS},
579 // a macron, *, *
580 /* 226 */ {0x0101, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_8},
581 // a breve, *, *
582 /* 227 */ {0x0103, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
583 // a breve, *, *
584 /* 228 */ {0x0103, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_1},
585 // a ogonek, *, *
586 /* 229 */ {0x0105, 0x2460, 0x2461, DomCode::DIGIT1, VKEY_1},
587 // a ogonek, *, *
588 /* 230 */ {0x0105, 0x2460, 0x2461, DomCode::KEY_Q, VKEY_Q},
589 // a ogonek, *, *
590 /* 231 */ {0x0105, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
591 // c acute, *, *
592 /* 232 */ {0x0107, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_7},
593 // c dot above, *, *
594 /* 233 */ {0x010B, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_3},
595 // c caron, *, *
596 /* 234 */ {0x010D, 0x2460, 0x2461, DomCode::COMMA, VKEY_OEM_COMMA},
597 // c caron, *, *
598 /* 235 */ {0x010D, 0x2460, 0x2461, DomCode::DIGIT2, VKEY_2},
599 // c caron, *, *
600 /* 236 */ {0x010D, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
601 // c caron, *, *
602 /* 237 */ {0x010D, 0x2460, 0x2461, DomCode::KEY_P, VKEY_X},
603 // c caron, *, *
604 /* 238 */ {0x010D, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
605 // d stroke, *, *
606 /* 239 */ {0x0111, 0x2460, 0x2461, DomCode::BRACKET_RIGHT, VKEY_OEM_6},
607 // d stroke, *, *
608 /* 240 */ {0x0111, 0x2460, 0x2461, DomCode::DIGIT0, VKEY_0},
609 // e macron, *, *
610 /* 241 */ {0x0113, 0x2460, 0x2461, DomCode::NONE, VKEY_W},
611 // e dot above, *, *
612 /* 242 */ {0x0117, 0x2460, 0x2461, DomCode::DIGIT4, VKEY_4},
613 // e dot above, *, *
614 /* 243 */ {0x0117, 0x2460, 0x2461, DomCode::QUOTE, VKEY_OEM_7},
615 // e ogonek, E ogonek, unmapped
616 /* 244 */ {0x0119, 0x0118, 0x0000, DomCode::SLASH, VKEY_OEM_MINUS},
617 // e ogonek, E ogonek, n
618 /* 245 */ {0x0119, 0x0118, 0x006E, DomCode::SLASH, VKEY_OEM_2},
619 // e ogonek, *, *
620 /* 246 */ {0x0119, 0x2460, 0x2461, DomCode::DIGIT3, VKEY_3},
621 // e caron, *, *
622 /* 247 */ {0x011B, 0x2460, 0x2461, DomCode::NONE, VKEY_2},
623 // g breve, *, *
624 /* 248 */ {0x011F, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
625 // g dot above, *, *
626 /* 249 */ {0x0121, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
627 // h stroke, *, *
628 /* 250 */ {0x0127, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
629 // i macron, *, *
630 /* 251 */ {0x012B, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
631 // i ogonek, I ogonek, unmapped
632 /* 252 */ {0x012F, 0x012E, 0x0000, DomCode::BRACKET_LEFT, VKEY_OEM_4},
633 // i ogonek, *, *
634 /* 253 */ {0x012F, 0x2460, 0x2461, DomCode::DIGIT5, VKEY_5},
635 // dotless i, *, *
636 /* 254 */ {0x0131, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_1},
637 // k cedilla, *, *
638 /* 255 */ {0x0137, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
639 // l cedilla, *, *
640 /* 256 */ {0x013C, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_2},
641 // l caron, *, *
642 /* 257 */ {0x013E, 0x2460, 0x2461, DomCode::NONE, VKEY_2},
643 // l stroke, *, *
644 /* 258 */ {0x0142, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_2},
645 // l stroke, *, *
646 /* 259 */ {0x0142, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
647 // n cedilla, *, *
648 /* 260 */ {0x0146, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
649 // n caron, *, *
650 /* 261 */ {0x0148, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
651 // o double acute, *, *
652 /* 262 */ {0x0151, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
653 // r caron, *, *
654 /* 263 */ {0x0159, 0x2460, 0x2461, DomCode::NONE, VKEY_5},
655 // s cedilla, *, *
656 /* 264 */ {0x015F, 0x2460, 0x2461, DomCode::PERIOD, VKEY_OEM_PERIOD},
657 // s cedilla, *, *
658 /* 265 */ {0x015F, 0x2460, 0x2461, DomCode::SEMICOLON, VKEY_OEM_1},
659 // s caron, *, *
660 /* 266 */ {0x0161, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
661 // s caron, *, *
662 /* 267 */ {0x0161, 0x2460, 0x2461, DomCode::DIGIT3, VKEY_3},
663 // s caron, *, *
664 /* 268 */ {0x0161, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
665 // s caron, *, *
666 /* 269 */ {0x0161, 0x2460, 0x2461, DomCode::KEY_A, VKEY_OEM_1},
667 // s caron, *, *
668 /* 270 */ {0x0161, 0x2460, 0x2461, DomCode::KEY_F, VKEY_F},
669 // s caron, *, *
670 /* 271 */ {0x0161, 0x2460, 0x2461, DomCode::PERIOD, VKEY_OEM_PERIOD},
671 // t cedilla, *, *
672 /* 272 */ {0x0163, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_7},
673 // t caron, *, *
674 /* 273 */ {0x0165, 0x2460, 0x2461, DomCode::NONE, VKEY_5},
675 // u macron, *, *
676 /* 274 */ {0x016B, 0x2460, 0x2461, DomCode::DIGIT8, VKEY_8},
677 // u macron, *, *
678 /* 275 */ {0x016B, 0x2460, 0x2461, DomCode::KEY_Q, VKEY_Q},
679 // u macron, *, *
680 /* 276 */ {0x016B, 0x2460, 0x2461, DomCode::KEY_X, VKEY_X},
681 // u ring above, *, *
682 /* 277 */ {0x016F, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_1},
683 // u double acute, *, *
684 /* 278 */ {0x0171, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_5},
685 // u ogonek, U ogonek, unmapped
686 /* 279 */ {0x0173, 0x0172, 0x0000, DomCode::SEMICOLON, VKEY_OEM_3},
687 // u ogonek, U ogonek, T cedilla
688 /* 280 */ {0x0173, 0x0172, 0x0162, DomCode::SEMICOLON, VKEY_OEM_1},
689 // u ogonek, *, *
690 /* 281 */ {0x0173, 0x2460, 0x2461, DomCode::DIGIT7, VKEY_7},
691 // z dot above, *, *
692 /* 282 */ {0x017C, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
693 // z dot above, *, *
694 /* 283 */ {0x017C, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_OEM_4},
695 // z caron, *, *
696 /* 284 */ {0x017E, 0x2460, 0x2461, DomCode::BACKSLASH, VKEY_OEM_5},
697 // z caron, *, *
698 /* 285 */ {0x017E, 0x2460, 0x2461, DomCode::BRACKET_LEFT, VKEY_Y},
699 // z caron, *, *
700 /* 286 */ {0x017E, 0x2460, 0x2461, DomCode::DIGIT6, VKEY_6},
701 // z caron, *, *
702 /* 287 */ {0x017E, 0x2460, 0x2461, DomCode::EQUAL, VKEY_OEM_PLUS},
703 // z caron, *, *
704 /* 288 */ {0x017E, 0x2460, 0x2461, DomCode::KEY_W, VKEY_W},
705 // o horn, *, *
706 /* 289 */ {0x01A1, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
707 // u horn, *, *
708 /* 290 */ {0x01B0, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_4},
709 // z stroke, *, *
710 /* 291 */ {0x01B6, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_6},
711 // schwa, *, *
712 /* 292 */ {0x0259, 0x2460, 0x2461, DomCode::NONE, VKEY_OEM_3},
714 // Simple alphanumeric cases.
715 /* 293 */ {'a', 'A', '?', DomCode::NONE, VKEY_A},
716 /* 294 */ {'z', 'Z', '!', DomCode::NONE, VKEY_Z},
717 /* 295 */ {'9', '(', '+', DomCode::NONE, VKEY_9},
718 /* 296 */ {'0', ')', '-', DomCode::NONE, VKEY_0},
721 for (size_t i = 0; i < arraysize(kVkeyTestCase); ++i) {
722 SCOPED_TRACE(i);
723 const VkTestXkbKeyboardLayoutEngine::Entry* e = &kVkeyTestCase[i];
724 layout_engine_->SetEntry(e);
726 // Test with predetermined plain character.
727 KeyboardCode key_code = layout_engine_->GetKeyboardCode(
728 e->dom_code, EF_NONE, e->plain_character);
729 EXPECT_EQ(e->key_code, key_code);
731 if (e->shift_character) {
732 // Test with predetermined shifted character.
733 key_code = layout_engine_->GetKeyboardCode(e->dom_code, EF_SHIFT_DOWN,
734 e->shift_character);
735 EXPECT_EQ(e->key_code, key_code);
738 if (e->altgr_character) {
739 // Test with predetermined AltGr character.
740 key_code = layout_engine_->GetKeyboardCode(e->dom_code, EF_ALTGR_DOWN,
741 e->altgr_character);
742 EXPECT_EQ(e->key_code, key_code);
745 // Test with unrelated predetermined character.
746 key_code =
747 layout_engine_->GetKeyboardCode(e->dom_code, EF_MOD3_DOWN, 0xFFFFu);
748 EXPECT_EQ(e->key_code, key_code);
752 TEST_F(XkbLayoutEngineVkTest, XkbRuleNamesForLayoutName) {
753 static const VkTestXkbKeyboardLayoutEngine::RuleNames kVkeyTestCase[] = {
754 /* 0 */ {"us", "us", ""},
755 /* 1 */ {"jp", "jp", ""},
756 /* 2 */ {"us(intl)", "us", "intl"},
757 /* 3 */ {"us(altgr-intl)", "us", "altgr-intl"},
758 /* 4 */ {"us(dvorak)", "us", "dvorak"},
759 /* 5 */ {"us(colemak)", "us", "colemak"},
760 /* 6 */ {"be", "be", ""},
761 /* 7 */ {"fr", "fr", ""},
762 /* 8 */ {"ca", "ca", ""},
763 /* 9 */ {"ch(fr)", "ch", "fr"},
764 /* 10 */ {"ca(multix)", "ca", "multix"},
765 /* 11 */ {"de", "de", ""},
766 /* 12 */ {"de(neo)", "de", "neo"},
767 /* 13 */ {"ch", "ch", ""},
768 /* 14 */ {"ru", "ru", ""},
769 /* 15 */ {"ru(phonetic)", "ru", "phonetic"},
770 /* 16 */ {"br", "br", ""},
771 /* 17 */ {"bg", "bg", ""},
772 /* 18 */ {"bg(phonetic)", "bg", "phonetic"},
773 /* 19 */ {"ca(eng)", "ca", "eng"},
774 /* 20 */ {"cz", "cz", ""},
775 /* 21 */ {"cz(qwerty)", "cz", "qwerty"},
776 /* 22 */ {"ee", "ee", ""},
777 /* 23 */ {"es", "es", ""},
778 /* 24 */ {"es(cat)", "es", "cat"},
779 /* 25 */ {"dk", "dk", ""},
780 /* 26 */ {"gr", "gr", ""},
781 /* 27 */ {"il", "il", ""},
782 /* 28 */ {"latam", "latam", ""},
783 /* 29 */ {"lt", "lt", ""},
784 /* 30 */ {"lv(apostrophe)", "lv", "apostrophe"},
785 /* 31 */ {"hr", "hr", ""},
786 /* 32 */ {"gb(extd)", "gb", "extd"},
787 /* 33 */ {"gb(dvorak)", "gb", "dvorak"},
788 /* 34 */ {"fi", "fi", ""},
789 /* 35 */ {"hu", "hu", ""},
790 /* 36 */ {"it", "it", ""},
791 /* 37 */ {"is", "is", ""},
792 /* 38 */ {"no", "no", ""},
793 /* 39 */ {"pl", "pl", ""},
794 /* 40 */ {"pt", "pt", ""},
795 /* 41 */ {"ro", "ro", ""},
796 /* 42 */ {"se", "se", ""},
797 /* 43 */ {"sk", "sk", ""},
798 /* 44 */ {"si", "si", ""},
799 /* 45 */ {"rs", "rs", ""},
800 /* 46 */ {"tr", "tr", ""},
801 /* 47 */ {"ua", "ua", ""},
802 /* 48 */ {"by", "by", ""},
803 /* 49 */ {"am", "am", ""},
804 /* 50 */ {"ge", "ge", ""},
805 /* 51 */ {"mn", "mn", ""},
806 /* 52 */ {"ie", "ie", ""}};
807 for (size_t i = 0; i < arraysize(kVkeyTestCase); ++i) {
808 SCOPED_TRACE(i);
809 const VkTestXkbKeyboardLayoutEngine::RuleNames* e = &kVkeyTestCase[i];
810 std::string layout_id;
811 std::string layout_variant;
812 XkbKeyboardLayoutEngine::ParseLayoutName(e->layout_name, &layout_id,
813 &layout_variant);
814 EXPECT_EQ(layout_id, e->layout);
815 EXPECT_EQ(layout_variant, e->variant);
819 } // namespace ui