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

Side by Side Diff: chrome/browser/ui/ash/event_rewriter.h

Issue 11578044: Enable Search-key modifiers for extended key shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_
6 #define CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ 6 #define CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void RefreshKeycodes(); 98 void RefreshKeycodes();
99 // Converts an X key symbol like XK_Control_L to a key code. 99 // Converts an X key symbol like XK_Control_L to a key code.
100 unsigned char NativeKeySymToNativeKeycode(KeySym keysym); 100 unsigned char NativeKeySymToNativeKeycode(KeySym keysym);
101 101
102 struct KeyboardRemapping { 102 struct KeyboardRemapping {
103 KeySym input_keysym; 103 KeySym input_keysym;
104 unsigned int input_mods; 104 unsigned int input_mods;
105 unsigned int input_native_mods; 105 unsigned int input_native_mods;
106 KeySym output_keysym; 106 KeySym output_keysym;
107 ui::KeyboardCode output_keycode; 107 ui::KeyboardCode output_keycode;
108 unsigned int output_mods;
109 unsigned int output_native_mods;
108 }; 110 };
109 111
110 // Given a set of KeyboardRemapping structs, it finds a matching struct 112 // Given a set of KeyboardRemapping structs, it finds a matching struct
111 // if possible, and updates the remapped event values. Returns true if a 113 // if possible, and updates the remapped event values. Returns true if a
112 // remapping was found and remapped values were updated. 114 // remapping was found and remapped values were updated.
113 bool RewriteWithKeyboardRemappingsByKeySym( 115 bool RewriteWithKeyboardRemappingsByKeySym(
114 const KeyboardRemapping* remappings, 116 const KeyboardRemapping* remappings,
115 size_t num_remappings, 117 size_t num_remappings,
116 KeySym keysym, 118 KeySym keysym,
117 unsigned int native_mods, 119 unsigned int native_mods,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 210
209 chromeos::input_method::XKeyboard* xkeyboard_; // for testing. 211 chromeos::input_method::XKeyboard* xkeyboard_; // for testing.
210 #endif 212 #endif
211 213
212 const PrefService* pref_service_; // for testing. 214 const PrefService* pref_service_; // for testing.
213 215
214 DISALLOW_COPY_AND_ASSIGN(EventRewriter); 216 DISALLOW_COPY_AND_ASSIGN(EventRewriter);
215 }; 217 };
216 218
217 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ 219 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698