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

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: rebase after crrev.com/308447 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 DomKey XkbKeySymToDomKey(xkb_keysym_t keysym) { 11 DomKey NonPrintableXkbKeySymToDomKey(xkb_keysym_t keysym) {
12 switch (keysym) { 12 switch (keysym) {
13 case XKB_KEY_BackSpace: 13 case XKB_KEY_BackSpace:
14 return DomKey::BACKSPACE; 14 return DomKey::BACKSPACE;
15 case XKB_KEY_Tab: 15 case XKB_KEY_Tab:
16 case XKB_KEY_KP_Tab: 16 case XKB_KEY_KP_Tab:
17 case XKB_KEY_ISO_Left_Tab: 17 case XKB_KEY_ISO_Left_Tab:
18 return DomKey::TAB; 18 return DomKey::TAB;
19 case XKB_KEY_Clear: 19 case XKB_KEY_Clear:
20 case XKB_KEY_KP_Begin: 20 case XKB_KEY_KP_Begin:
21 case XKB_KEY_XF86Clear: 21 case XKB_KEY_XF86Clear:
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 case XKB_KEY_dead_belowdiaeresis: 370 case XKB_KEY_dead_belowdiaeresis:
371 case XKB_KEY_dead_invertedbreve: 371 case XKB_KEY_dead_invertedbreve:
372 case XKB_KEY_dead_belowcomma: 372 case XKB_KEY_dead_belowcomma:
373 case XKB_KEY_dead_currency: 373 case XKB_KEY_dead_currency:
374 return DomKey::DEAD; 374 return DomKey::DEAD;
375 default: 375 default:
376 return DomKey::NONE; 376 return DomKey::NONE;
377 } 377 }
378 } 378 }
379 379
380 base::char16 XkbKeySymDeadKey(xkb_keysym_t keysym) { 380 base::char16 DeadXkbKeySymToCombiningCharacter(xkb_keysym_t keysym) {
381 switch (keysym) { 381 switch (keysym) {
382 case XKB_KEY_dead_grave: 382 case XKB_KEY_dead_grave:
383 return 0x0768; // combining grave accent 383 return 0x0768; // combining grave accent
384 case XKB_KEY_dead_acute: 384 case XKB_KEY_dead_acute:
385 return 0x0769; // combining acute accent 385 return 0x0769; // combining acute accent
386 case XKB_KEY_dead_circumflex: 386 case XKB_KEY_dead_circumflex:
387 return 0x0770; // combining circumflex accent 387 return 0x0770; // combining circumflex accent
388 case XKB_KEY_dead_tilde: 388 case XKB_KEY_dead_tilde:
389 return 0x0771; // combining tilde 389 return 0x0771; // combining tilde
390 case XKB_KEY_dead_macron: 390 case XKB_KEY_dead_macron:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 case XKB_KEY_dead_belowcomma: 438 case XKB_KEY_dead_belowcomma:
439 return 0x0806; // combining comma below 439 return 0x0806; // combining comma below
440 case XKB_KEY_dead_currency: 440 case XKB_KEY_dead_currency:
441 return 0x0164; // currency sign 441 return 0x0164; // currency sign
442 default: 442 default:
443 return 0; 443 return 0;
444 } 444 }
445 } 445 }
446 446
447 } // namespace ui 447 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.h ('k') | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698