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

Side by Side Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h

Issue 834373002: ozone: xkb: Fix number pad key mappings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 | « no previous file | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 5 #ifndef UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
7 7
8 #include <xkbcommon/xkbcommon.h> 8 #include <xkbcommon/xkbcommon.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 27 matching lines...) Expand all
38 uint32* platform_keycode) const override; 38 uint32* platform_keycode) const override;
39 39
40 protected: 40 protected:
41 // Table for EventFlagsToXkbFlags(). 41 // Table for EventFlagsToXkbFlags().
42 struct XkbFlagMapEntry { 42 struct XkbFlagMapEntry {
43 int ui_flag; 43 int ui_flag;
44 xkb_mod_mask_t xkb_flag; 44 xkb_mod_mask_t xkb_flag;
45 }; 45 };
46 std::vector<XkbFlagMapEntry> xkb_flag_map_; 46 std::vector<XkbFlagMapEntry> xkb_flag_map_;
47 47
48 // Flag mask for num lock, which is always considered enabled.
49 xkb_mod_mask_t num_lock_mod_mask_;
50
48 // Determines the Windows-based KeyboardCode (VKEY) for a character key, 51 // Determines the Windows-based KeyboardCode (VKEY) for a character key,
49 // accounting for non-US layouts. May return VKEY_UNKNOWN, in which case the 52 // accounting for non-US layouts. May return VKEY_UNKNOWN, in which case the
50 // caller should use |DomCodeToNonLocatedKeyboardCode()| as a last resort. 53 // caller should use |DomCodeToNonLocatedKeyboardCode()| as a last resort.
51 KeyboardCode DifficultKeyboardCode(DomCode dom_code, 54 KeyboardCode DifficultKeyboardCode(DomCode dom_code,
52 int ui_flags, 55 int ui_flags,
53 xkb_keycode_t xkb_keycode, 56 xkb_keycode_t xkb_keycode,
54 xkb_mod_mask_t xkb_flags, 57 xkb_mod_mask_t xkb_flags,
55 xkb_keysym_t xkb_keysym, 58 xkb_keysym_t xkb_keysym,
56 DomKey dom_key, 59 DomKey dom_key,
57 base::char16 character) const; 60 base::char16 character) const;
(...skipping 26 matching lines...) Expand all
84 87
85 // libxkbcommon uses explicit reference counting for its structures, 88 // libxkbcommon uses explicit reference counting for its structures,
86 // so we need to trigger its cleanup. 89 // so we need to trigger its cleanup.
87 scoped_ptr<xkb_context, XkbContextDeleter> xkb_context_; 90 scoped_ptr<xkb_context, XkbContextDeleter> xkb_context_;
88 scoped_ptr<xkb_state, XkbStateDeleter> xkb_state_; 91 scoped_ptr<xkb_state, XkbStateDeleter> xkb_state_;
89 }; 92 };
90 93
91 } // namespace ui 94 } // namespace ui
92 95
93 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 96 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698