| OLD | NEW |
| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // * Alt+Up -> Prior (aka PageUp) | 118 // * Alt+Up -> Prior (aka PageUp) |
| 119 // * Alt+Down -> Next (aka PageDown) | 119 // * Alt+Down -> Next (aka PageDown) |
| 120 // * Ctrl+Alt+Up -> Home | 120 // * Ctrl+Alt+Up -> Home |
| 121 // * Ctrl+Alt+Down -> End | 121 // * Ctrl+Alt+Down -> End |
| 122 // When the Search key acts as a function key, it instead maps: | 122 // When the Search key acts as a function key, it instead maps: |
| 123 // * Search+Backspace -> Delete | 123 // * Search+Backspace -> Delete |
| 124 // * Search+Up -> Prior (aka PageUp) | 124 // * Search+Up -> Prior (aka PageUp) |
| 125 // * Search+Down -> Next (aka PageDown) | 125 // * Search+Down -> Next (aka PageDown) |
| 126 // * Search+Left -> Home | 126 // * Search+Left -> Home |
| 127 // * Search+right -> End | 127 // * Search+right -> End |
| 128 // * Search+\ -> Insert |
| 128 // Returns true whn the |event| is rewritten. | 129 // Returns true whn the |event| is rewritten. |
| 129 bool RewriteBackspaceAndArrowKeys(ui::KeyEvent* event); | 130 bool RewriteBackspaceBackslashAndArrowKeys(ui::KeyEvent* event); |
| 130 | 131 |
| 131 // When the Search key acts as a function key, it remaps Search+1 | 132 // When the Search key acts as a function key, it remaps Search+1 |
| 132 // through Search+= to F1 through F12. Returns true whn the |event| is | 133 // through Search+= to F1 through F12. Returns true whn the |event| is |
| 133 // rewritten. | 134 // rewritten. |
| 134 bool RewriteFunctionKeys(ui::KeyEvent* event); | 135 bool RewriteFunctionKeys(ui::KeyEvent* event); |
| 135 | 136 |
| 136 #if defined(OS_CHROMEOS) | 137 #if defined(OS_CHROMEOS) |
| 137 // When the Search key acts as a function key, it drops Search key presses, | 138 // When the Search key acts as a function key, it drops Search key presses, |
| 138 // and drops the release as well if any key is pressed while Search was down. | 139 // and drops the release as well if any key is pressed while Search was down. |
| 139 bool DropSearchKey(ui::KeyEvent* event); | 140 bool DropSearchKey(ui::KeyEvent* event); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 unsigned int meta_l_xkeycode_; | 181 unsigned int meta_l_xkeycode_; |
| 181 unsigned int meta_r_xkeycode_; | 182 unsigned int meta_r_xkeycode_; |
| 182 unsigned int windows_l_xkeycode_; | 183 unsigned int windows_l_xkeycode_; |
| 183 unsigned int caps_lock_xkeycode_; | 184 unsigned int caps_lock_xkeycode_; |
| 184 unsigned int void_symbol_xkeycode_; | 185 unsigned int void_symbol_xkeycode_; |
| 185 unsigned int delete_xkeycode_; | 186 unsigned int delete_xkeycode_; |
| 186 unsigned int home_xkeycode_; | 187 unsigned int home_xkeycode_; |
| 187 unsigned int end_xkeycode_; | 188 unsigned int end_xkeycode_; |
| 188 unsigned int prior_xkeycode_; | 189 unsigned int prior_xkeycode_; |
| 189 unsigned int next_xkeycode_; | 190 unsigned int next_xkeycode_; |
| 191 unsigned int insert_xkeycode_; |
| 190 unsigned int kp_0_xkeycode_; | 192 unsigned int kp_0_xkeycode_; |
| 191 unsigned int kp_1_xkeycode_; | 193 unsigned int kp_1_xkeycode_; |
| 192 unsigned int kp_2_xkeycode_; | 194 unsigned int kp_2_xkeycode_; |
| 193 unsigned int kp_3_xkeycode_; | 195 unsigned int kp_3_xkeycode_; |
| 194 unsigned int kp_4_xkeycode_; | 196 unsigned int kp_4_xkeycode_; |
| 195 unsigned int kp_5_xkeycode_; | 197 unsigned int kp_5_xkeycode_; |
| 196 unsigned int kp_6_xkeycode_; | 198 unsigned int kp_6_xkeycode_; |
| 197 unsigned int kp_7_xkeycode_; | 199 unsigned int kp_7_xkeycode_; |
| 198 unsigned int kp_8_xkeycode_; | 200 unsigned int kp_8_xkeycode_; |
| 199 unsigned int kp_9_xkeycode_; | 201 unsigned int kp_9_xkeycode_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 224 | 226 |
| 225 chromeos::input_method::XKeyboard* xkeyboard_; // for testing. | 227 chromeos::input_method::XKeyboard* xkeyboard_; // for testing. |
| 226 #endif | 228 #endif |
| 227 | 229 |
| 228 const PrefService* pref_service_; // for testing. | 230 const PrefService* pref_service_; // for testing. |
| 229 | 231 |
| 230 DISALLOW_COPY_AND_ASSIGN(EventRewriter); | 232 DISALLOW_COPY_AND_ASSIGN(EventRewriter); |
| 231 }; | 233 }; |
| 232 | 234 |
| 233 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ | 235 #endif // CHROME_BROWSER_UI_ASH_EVENT_REWRITER_H_ |
| OLD | NEW |