| Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
|
| diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
|
| index 0b4cb734650d6806c59fceba88188455c016bac9..9a9309ff9948bda9f6734d29595aa7320a64832b 100644
|
| --- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
|
| +++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
|
| @@ -18,8 +18,7 @@
|
| #include "ui/events/keycodes/dom3/dom_key.h"
|
| #include "ui/events/keycodes/dom4/keycode_converter.h"
|
| #include "ui/events/keycodes/keyboard_code_conversion.h"
|
| -#include "ui/events/ozone/layout/layout_util.h"
|
| -#include "ui/events/ozone/layout/xkb/xkb_keyboard_code_conversion.h"
|
| +#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
|
|
|
| namespace ui {
|
|
|
| @@ -29,22 +28,6 @@ typedef base::Callback<void(const std::string&,
|
| scoped_ptr<char, base::FreeDeleter>)>
|
| LoadKeymapCallback;
|
|
|
| -DomKey CharacterToDomKey(base::char16 character) {
|
| - switch (character) {
|
| - case 0x08:
|
| - return DomKey::BACKSPACE;
|
| - case 0x09:
|
| - return DomKey::TAB;
|
| - case 0x0A:
|
| - case 0x0D:
|
| - return DomKey::ENTER;
|
| - case 0x1B:
|
| - return DomKey::ESCAPE;
|
| - default:
|
| - return DomKey::CHARACTER;
|
| - }
|
| -}
|
| -
|
| KeyboardCode AlphanumericKeyboardCode(base::char16 character) {
|
| // Plain ASCII letters and digits map directly to VKEY values.
|
| if ((character >= '0') && (character <= '9'))
|
| @@ -766,6 +749,7 @@ bool XkbKeyboardLayoutEngine::Lookup(DomCode dom_code,
|
| *platform_keycode = xkb_keysym;
|
| // Classify the keysym and convert to DOM and VKEY representations.
|
| *dom_key = NonPrintableXkbKeySymToDomKey(xkb_keysym);
|
| + KeyboardCode keyboard_code = DomCodeToKeyboardCode(dom_code);
|
| if (*dom_key == DomKey::NONE) {
|
| *dom_key = CharacterToDomKey(*character);
|
| *key_code = AlphanumericKeyboardCode(*character);
|
| @@ -781,11 +765,11 @@ bool XkbKeyboardLayoutEngine::Lookup(DomCode dom_code,
|
| *character = 0;
|
| } else if (*dom_key == DomKey::DEAD) {
|
| *character = DeadXkbKeySymToCombiningCharacter(xkb_keysym);
|
| - *key_code = DomCodeToUsLayoutKeyboardCode(dom_code);
|
| + *key_code = LocatedToNonLocatedKeyboardCode(keyboard_code);
|
| } else {
|
| *key_code = NonPrintableDomKeyToKeyboardCode(*dom_key);
|
| if (*key_code == VKEY_UNKNOWN)
|
| - *key_code = DomCodeToUsLayoutKeyboardCode(dom_code);
|
| + *key_code = LocatedToNonLocatedKeyboardCode(keyboard_code);
|
| }
|
| return true;
|
| }
|
|
|