Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc

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

Powered by Google App Engine
This is Rietveld 408576698