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

Side by Side Diff: ui/events/ozone/layout/layout_util.h

Issue 954943003: [KeyboardEvent] Use DOM |code| rather than Windows-based key code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing VKEY in windows for brightness and power Created 5 years, 9 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
« no previous file with comments | « ui/events/ozone/events_ozone.gyp ('k') | ui/events/ozone/layout/layout_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_
6 #define UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_
7
8 // TODO(kpschoedel): consider moving this out of Ozone.
9
10 #include "base/strings/string16.h"
11 #include "ui/events/keycodes/keyboard_codes.h"
12 #include "ui/events/ozone/layout/events_ozone_layout_export.h"
13
14 namespace ui {
15
16 enum class DomCode;
17 enum class DomKey;
18
19 // Returns a Windows-based VKEY for a non-printable DOM Level 3 |key|.
20 // The returned VKEY is non-located (e.g. VKEY_SHIFT).
21 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode
22 NonPrintableDomKeyToKeyboardCode(DomKey dom_key);
23
24 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|.
25 // The returned VKEY is located (e.g. VKEY_LSHIFT).
26 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode DomCodeToKeyboardCode(DomCode dom_code);
27
28 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|.
29 // The returned VKEY is non-located (e.g. VKEY_SHIFT).
30 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode
31 DomCodeToNonLocatedKeyboardCode(DomCode dom_code);
32
33 // Returns true control character corresponding to a physical key.
34 // In some contexts this is used instead of the key layout.
35 EVENTS_OZONE_LAYOUT_EXPORT bool LookupControlCharacter(DomCode dom_code,
36 int flags,
37 DomKey* dom_key,
38 base::char16* character,
39 KeyboardCode* key_code);
40
41 // Returns the ui::EventFlags value associated with a modifier key,
42 // or 0 (EF_NONE) if the key is not a modifier.
43 EVENTS_OZONE_LAYOUT_EXPORT int ModifierDomKeyToEventFlag(DomKey key);
44
45 } // namespace ui
46
47 #endif // UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/events_ozone.gyp ('k') | ui/events/ozone/layout/layout_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698