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

Side by Side Diff: ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.h" 5 #include "ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.h"
6 6
7 #include "ui/events/keycodes/dom3/dom_key.h" 7 #include "ui/events/keycodes/dom3/dom_key.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
11 namespace { 11 namespace {
12 12
13 } // anonymous namespace 13 } // anonymous namespace
14 14
15 DomKey XkbKeySymToDomKey(xkb_keysym_t keysym) { 15 DomKey NonPrintableXkbKeySymToDomKey(xkb_keysym_t keysym) {
16 switch (keysym) { 16 switch (keysym) {
17 case XKB_KEY_BackSpace: 17 case XKB_KEY_BackSpace:
18 return DomKey::BACKSPACE; 18 return DomKey::BACKSPACE;
19 case XKB_KEY_Tab: 19 case XKB_KEY_Tab:
20 case XKB_KEY_KP_Tab: 20 case XKB_KEY_KP_Tab:
21 case XKB_KEY_ISO_Left_Tab: 21 case XKB_KEY_ISO_Left_Tab:
22 return DomKey::TAB; 22 return DomKey::TAB;
23 case XKB_KEY_Clear: 23 case XKB_KEY_Clear:
24 case XKB_KEY_KP_Begin: 24 case XKB_KEY_KP_Begin:
25 case XKB_KEY_XF86Clear: 25 case XKB_KEY_XF86Clear:
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 case XKB_KEY_dead_belowdiaeresis: 374 case XKB_KEY_dead_belowdiaeresis:
375 case XKB_KEY_dead_invertedbreve: 375 case XKB_KEY_dead_invertedbreve:
376 case XKB_KEY_dead_belowcomma: 376 case XKB_KEY_dead_belowcomma:
377 case XKB_KEY_dead_currency: 377 case XKB_KEY_dead_currency:
378 return DomKey::DEAD; 378 return DomKey::DEAD;
379 default: 379 default:
380 return DomKey::NONE; 380 return DomKey::NONE;
381 } 381 }
382 } 382 }
383 383
384 base::char16 XkbKeySymDeadKey(xkb_keysym_t keysym) { 384 base::char16 DeadXkbKeySymToCombiningCharacter(xkb_keysym_t keysym) {
385 switch (keysym) { 385 switch (keysym) {
386 case XKB_KEY_dead_grave: 386 case XKB_KEY_dead_grave:
387 return 0x0768; // combining grave accent 387 return 0x0768; // combining grave accent
388 case XKB_KEY_dead_acute: 388 case XKB_KEY_dead_acute:
389 return 0x0769; // combining acute accent 389 return 0x0769; // combining acute accent
390 case XKB_KEY_dead_circumflex: 390 case XKB_KEY_dead_circumflex:
391 return 0x0770; // combining circumflex accent 391 return 0x0770; // combining circumflex accent
392 case XKB_KEY_dead_tilde: 392 case XKB_KEY_dead_tilde:
393 return 0x0771; // combining tilde 393 return 0x0771; // combining tilde
394 case XKB_KEY_dead_macron: 394 case XKB_KEY_dead_macron:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 case XKB_KEY_dead_belowcomma: 442 case XKB_KEY_dead_belowcomma:
443 return 0x0806; // combining comma below 443 return 0x0806; // combining comma below
444 case XKB_KEY_dead_currency: 444 case XKB_KEY_dead_currency:
445 return 0x0164; // currency sign 445 return 0x0164; // currency sign
446 default: 446 default:
447 return 0; 447 return 0;
448 } 448 }
449 } 449 }
450 450
451 } // namespace ui 451 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698