| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/keycodes/keyboard_code_conversion_x.h" | 5 #include "ui/events/keycodes/keyboard_code_conversion_x.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #define XK_3270 // for XK_3270_BackTab | 9 #define XK_3270 // for XK_3270_BackTab |
| 10 #include <X11/XF86keysym.h> | 10 #include <X11/XF86keysym.h> |
| 11 #include <X11/Xlib.h> | 11 #include <X11/Xlib.h> |
| 12 #include <X11/Xutil.h> | 12 #include <X11/Xutil.h> |
| 13 #include <X11/extensions/XInput2.h> | 13 #include <X11/extensions/XInput2.h> |
| 14 #include <X11/keysym.h> | 14 #include <X11/keysym.h> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 21 #include "ui/events/keycodes/dom4/keycode_converter.h" | 21 #include "ui/events/keycodes/dom/keycode_converter.h" |
| 22 #include "ui/events/x/keysym_to_unicode.h" | 22 #include "ui/events/x/keysym_to_unicode.h" |
| 23 | 23 |
| 24 #define VKEY_UNSUPPORTED VKEY_UNKNOWN | 24 #define VKEY_UNSUPPORTED VKEY_UNKNOWN |
| 25 | 25 |
| 26 namespace ui { | 26 namespace ui { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // MAP0 - MAP3: | 30 // MAP0 - MAP3: |
| 31 // These are the generated VKEY code maps for all possible Latin keyboard | 31 // These are the generated VKEY code maps for all possible Latin keyboard |
| (...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND | 1384 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND |
| 1385 // (the '<>' key between Shift and Z on 105-key keyboards) which does. | 1385 // (the '<>' key between Shift and Z on 105-key keyboards) which does. |
| 1386 // | 1386 // |
| 1387 // crbug.com/386066 and crbug.com/390263 are examples of problems | 1387 // crbug.com/386066 and crbug.com/390263 are examples of problems |
| 1388 // associated with this. | 1388 // associated with this. |
| 1389 // | 1389 // |
| 1390 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false)); | 1390 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false)); |
| 1391 } | 1391 } |
| 1392 | 1392 |
| 1393 } // namespace ui | 1393 } // namespace ui |
| OLD | NEW |