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

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

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SkyNits 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
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/ash/event_rewriter.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) 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Rewrites a NumPad key press/release without Num Lock to a corresponding key 109 // Rewrites a NumPad key press/release without Num Lock to a corresponding key
110 // press/release with the lock. Returns true when |event| is rewritten. 110 // press/release with the lock. Returns true when |event| is rewritten.
111 bool RewriteNumPadKeys(ui::KeyEvent* event); 111 bool RewriteNumPadKeys(ui::KeyEvent* event);
112 112
113 // Rewrites Backspace and Arrow keys following the Chrome OS keyboard spec. 113 // Rewrites Backspace and Arrow keys following the Chrome OS keyboard spec.
114 // * Alt+Backspace -> Delete 114 // * Alt+Backspace -> Delete
115 // * Alt+Up -> Prior (aka PageUp) 115 // * Alt+Up -> Prior (aka PageUp)
116 // * Alt+Down -> Next (aka PageDown) 116 // * Alt+Down -> Next (aka PageDown)
117 // * Ctrl+Alt+Up -> Home 117 // * Ctrl+Alt+Up -> Home
118 // * Ctrl+Alt+Down -> End 118 // * Ctrl+Alt+Down -> End
119 // When the Search key acts as a function key, it instead maps:
120 // * Search+Backspace -> Delete
121 // * Search+Up -> Prior (aka PageUp)
122 // * Search+Down -> Next (aka PageDown)
123 // * Search+Left -> Home
124 // * Search+right -> End
125 // Returns true when the |event| is rewritten.
119 bool RewriteBackspaceAndArrowKeys(ui::KeyEvent* event); 126 bool RewriteBackspaceAndArrowKeys(ui::KeyEvent* event);
120 127
121 // Rewrites the located |event|. 128 // Rewrites the located |event|.
122 void RewriteLocatedEvent(ui::LocatedEvent* event); 129 void RewriteLocatedEvent(ui::LocatedEvent* event);
123 130
124 // Overwrites |event| with the keycodes and flags. 131 // Overwrites |event| with the keycodes and flags.
125 void OverwriteEvent(ui::KeyEvent* event, 132 void OverwriteEvent(ui::KeyEvent* event,
126 unsigned int new_native_keycode, 133 unsigned int new_native_keycode,
127 unsigned int new_native_state, 134 unsigned int new_native_state,
128 ui::KeyboardCode new_keycode, 135 ui::KeyboardCode new_keycode,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 182
176 chromeos::input_method::XKeyboard* xkeyboard_; // for testing. 183 chromeos::input_method::XKeyboard* xkeyboard_; // for testing.
177 #endif 184 #endif
178 185
179 const PrefService* pref_service_; // for testing. 186 const PrefService* pref_service_; // for testing.
180 187
181 DISALLOW_COPY_AND_ASSIGN(EventRewriter); 188 DISALLOW_COPY_AND_ASSIGN(EventRewriter);
182 }; 189 };
183 190
184 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ 191 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/ash/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698