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

Side by Side Diff: chrome/browser/ui/views/accelerator_table.cc

Issue 1177773002: Deprecating high-conflict accelerators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted whitespace from generated_resources.grd Created 5 years, 6 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
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 #include "chrome/browser/ui/views/accelerator_table.h" 5 #include "chrome/browser/ui/views/accelerator_table.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "ui/base/accelerators/accelerator.h" 9 #include "ui/base/accelerators/accelerator.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 { ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS }, 128 { ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS },
129 { ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB }, 129 { ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB },
130 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW }, 130 { ui::VKEY_F4, ui::EF_ALT_DOWN, IDC_CLOSE_WINDOW },
131 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD }, 131 { ui::VKEY_F5, ui::EF_NONE, IDC_RELOAD },
132 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, 132 { ui::VKEY_F5, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE },
133 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, 133 { ui::VKEY_F5, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE },
134 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE }, 134 { ui::VKEY_F6, ui::EF_NONE, IDC_FOCUS_NEXT_PANE },
135 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE }, 135 { ui::VKEY_F6, ui::EF_SHIFT_DOWN, IDC_FOCUS_PREVIOUS_PANE },
136 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 136 { ui::VKEY_F10, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
137 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN }, 137 { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN },
138 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER },
139 138
140 // Platform-specific key maps. 139 // Platform-specific key maps.
141 #if defined(OS_LINUX) 140 #if defined(OS_LINUX)
142 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK }, 141 { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
143 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD }, 142 { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
144 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME }, 143 { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },
145 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD }, 144 { ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD },
146 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE }, 145 { ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_IGNORING_CACHE },
147 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE }, 146 { ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_IGNORING_CACHE },
148 #endif // defined(OS_LINUX) 147 #endif // defined(OS_LINUX)
149 148
150 #if defined(OS_CHROMEOS) 149 #if defined(OS_CHROMEOS)
151 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash. 150 // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash.
152 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 151 { ui::VKEY_BACK, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
153 IDC_CLEAR_BROWSING_DATA }, 152 IDC_CLEAR_BROWSING_DATA },
154 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD }, 153 { ui::VKEY_OEM_2, ui::EF_CONTROL_DOWN, IDC_HELP_PAGE_VIA_KEYBOARD },
155 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 154 { ui::VKEY_OEM_2, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
156 IDC_HELP_PAGE_VIA_KEYBOARD }, 155 IDC_HELP_PAGE_VIA_KEYBOARD },
157 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER }, 156 { ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_MANAGER },
158 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP }, 157 { ui::VKEY_BROWSER_STOP, ui::EF_NONE, IDC_STOP },
159 { ui::VKEY_P, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 158 { ui::VKEY_P, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
160 IDC_TOUCH_HUD_PROJECTION_TOGGLE }, 159 IDC_TOUCH_HUD_PROJECTION_TOGGLE },
161 #else // OS_CHROMEOS 160 #else // OS_CHROMEOS
161 { ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, IDC_TASK_MANAGER },
oshima 2015/06/16 05:54:17 I believe this will make it impossible for web pag
afakhry 2015/06/16 22:30:33 This is intentional. Having this accelerator on Ch
oshima 2015/06/17 05:06:30 But this will change the current behavior, which I
162 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 162 { ui::VKEY_DELETE, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
163 IDC_CLEAR_BROWSING_DATA }, 163 IDC_CLEAR_BROWSING_DATA },
164 { ui::VKEY_LMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 164 { ui::VKEY_LMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
165 { ui::VKEY_MENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 165 { ui::VKEY_MENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
166 { ui::VKEY_RMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR }, 166 { ui::VKEY_RMENU, ui::EF_NONE, IDC_FOCUS_MENU_BAR },
167 // On Windows, all VKEY_BROWSER_* keys except VKEY_BROWSER_SEARCH are handled 167 // On Windows, all VKEY_BROWSER_* keys except VKEY_BROWSER_SEARCH are handled
168 // via WM_APPCOMMAND. 168 // via WM_APPCOMMAND.
169 { ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, IDC_FOCUS_SEARCH }, 169 { ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, IDC_FOCUS_SEARCH },
170 { ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_SHOW_AVATAR_MENU}, 170 { ui::VKEY_M, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_SHOW_AVATAR_MENU},
171 // On ChromeOS, these keys are assigned to change UI scale. 171 // On ChromeOS, these keys are assigned to change UI scale.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN); 254 *accelerator = ui::Accelerator(ui::VKEY_C, ui::EF_CONTROL_DOWN);
255 return true; 255 return true;
256 case IDC_PASTE: 256 case IDC_PASTE:
257 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN); 257 *accelerator = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN);
258 return true; 258 return true;
259 } 259 }
260 return false; 260 return false;
261 } 261 }
262 262
263 } // namespace chrome 263 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698