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

Side by Side Diff: ui/events/keycodes/platform_key_map_win.h

Issue 2630213003: Return AltGraph for right-Alt keydown/keyup, under layouts which use AltGraph. (Closed)
Patch Set: Add comment Created 3 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/keycodes/platform_key_map_win.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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_KEYCODES_PLATFORM_KEY_MAP_WIN_H_ 5 #ifndef UI_EVENTS_KEYCODES_PLATFORM_KEY_MAP_WIN_H_
6 #define UI_EVENTS_KEYCODES_PLATFORM_KEY_MAP_WIN_H_ 6 #define UI_EVENTS_KEYCODES_PLATFORM_KEY_MAP_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 26 matching lines...) Expand all
37 // TODO(chongz): Expose this function when we need to access separate layout. 37 // TODO(chongz): Expose this function when we need to access separate layout.
38 // Returns the DomKey 'meaning' of |KeyboardCode| in the context of specified 38 // Returns the DomKey 'meaning' of |KeyboardCode| in the context of specified
39 // |EventFlags| and stored keyboard layout. 39 // |EventFlags| and stored keyboard layout.
40 DomKey DomKeyFromKeyboardCodeImpl(KeyboardCode, int flags) const; 40 DomKey DomKeyFromKeyboardCodeImpl(KeyboardCode, int flags) const;
41 41
42 // TODO(chongz): Expose this function in response to WM_INPUTLANGCHANGE. 42 // TODO(chongz): Expose this function in response to WM_INPUTLANGCHANGE.
43 void UpdateLayout(HKL layout); 43 void UpdateLayout(HKL layout);
44 44
45 HKL keyboard_layout_ = 0; 45 HKL keyboard_layout_ = 0;
46 46
47 // True if |keyboard_layout_| makes use of the AltGraph modifier.
48 bool has_alt_graph_ = false;
49
47 typedef std::pair<int /*KeyboardCode*/, int /*EventFlags*/> 50 typedef std::pair<int /*KeyboardCode*/, int /*EventFlags*/>
48 KeyboardCodeEventFlagsPair; 51 KeyboardCodeEventFlagsPair;
49 typedef std::unordered_map<KeyboardCodeEventFlagsPair, 52 typedef std::unordered_map<KeyboardCodeEventFlagsPair,
50 DomKey, 53 DomKey,
51 base::IntPairHash<std::pair<int, int>>> 54 base::IntPairHash<std::pair<int, int>>>
52 KeyboardCodeToKeyMap; 55 KeyboardCodeToKeyMap;
53 KeyboardCodeToKeyMap printable_keycode_to_key_; 56 KeyboardCodeToKeyMap printable_keycode_to_key_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(PlatformKeyMap); 58 DISALLOW_COPY_AND_ASSIGN(PlatformKeyMap);
56 }; 59 };
57 60
58 } // namespace ui 61 } // namespace ui
59 62
60 #endif // UI_EVENTS_KEYCODES_PLATFORM_KEY_MAP_WIN_H_ 63 #endif // UI_EVENTS_KEYCODES_PLATFORM_KEY_MAP_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/keycodes/platform_key_map_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698