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/keycodes/keyboard_code_conversion_xkb.h" | 22 #include "ui/events/keycodes/keyboard_code_conversion_xkb.h" |
23 #include "ui/events/x/keysym_to_unicode.h" | 23 #include "ui/events/x/keysym_to_unicode.h" |
24 | 24 |
25 #define VKEY_UNSUPPORTED VKEY_UNKNOWN | 25 #define VKEY_UNSUPPORTED VKEY_UNKNOWN |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // MAP0 - MAP3: | 31 // MAP0 - MAP3: |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND | 1402 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND |
1403 // (the '<>' key between Shift and Z on 105-key keyboards) which does. | 1403 // (the '<>' key between Shift and Z on 105-key keyboards) which does. |
1404 // | 1404 // |
1405 // crbug.com/386066 and crbug.com/390263 are examples of problems | 1405 // crbug.com/386066 and crbug.com/390263 are examples of problems |
1406 // associated with this. | 1406 // associated with this. |
1407 // | 1407 // |
1408 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false)); | 1408 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false)); |
1409 } | 1409 } |
1410 | 1410 |
1411 } // namespace ui | 1411 } // namespace ui |
OLD | NEW |