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

Side by Side Diff: ui/events/keycodes/keyboard_code_conversion_x.cc

Issue 1880313004: Remove X11 deps from //ui/events:events_base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device_refactor
Patch Set: Maybe GYP actually works now? Created 4 years, 8 months 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 (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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #define XK_3270 // for XK_3270_BackTab 11 #define XK_3270 // for XK_3270_BackTab
12 #include <X11/XF86keysym.h> 12 #include <X11/XF86keysym.h>
13 #include <X11/Xlib.h> 13 #include <X11/Xlib.h>
14 #include <X11/Xutil.h> 14 #include <X11/Xutil.h>
15 #include <X11/extensions/XInput2.h> 15 #include <X11/extensions/XInput2.h>
16 #include <X11/keysym.h> 16 #include <X11/keysym.h>
17 17
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "base/strings/sys_string_conversions.h" 21 #include "base/strings/sys_string_conversions.h"
22 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
23 #include "ui/events/keycodes/dom/keycode_converter.h" 23 #include "ui/events/keycodes/dom/keycode_converter.h"
24 #include "ui/events/keycodes/keyboard_code_conversion_xkb.h" 24 #include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
25 #include "ui/events/x/keysym_to_unicode.h" 25 #include "ui/events/keycodes/keysym_to_unicode.h"
26 26
27 #define VKEY_UNSUPPORTED VKEY_UNKNOWN 27 #define VKEY_UNSUPPORTED VKEY_UNKNOWN
28 28
29 namespace ui { 29 namespace ui {
30 30
31 namespace { 31 namespace {
32 32
33 // MAP0 - MAP3: 33 // MAP0 - MAP3:
34 // These are the generated VKEY code maps for all possible Latin keyboard 34 // These are the generated VKEY code maps for all possible Latin keyboard
35 // layouts in Windows. And the maps are only for special letter keys excluding 35 // layouts in Windows. And the maps are only for special letter keys excluding
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND 1404 // alone does not map to XK_less; XKeysymToKeycode() returns KEY_102ND
1405 // (the '<>' key between Shift and Z on 105-key keyboards) which does. 1405 // (the '<>' key between Shift and Z on 105-key keyboards) which does.
1406 // 1406 //
1407 // crbug.com/386066 and crbug.com/390263 are examples of problems 1407 // crbug.com/386066 and crbug.com/390263 are examples of problems
1408 // associated with this. 1408 // associated with this.
1409 // 1409 //
1410 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false)); 1410 return XKeysymToKeycode(display, XKeysymForWindowsKeyCode(key_code, false));
1411 } 1411 }
1412 1412
1413 } // namespace ui 1413 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698