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

Side by Side Diff: ash/common/accelerators/accelerator_table.cc

Issue 2784393002: Deprecate Alt+Shift+K and replace it by Search+Shift+K (Closed)
Patch Set: Created 3 years, 8 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 | « ash/ash_strings.grd ('k') | chrome/app/chromeos_strings.grdp » ('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 #include "ash/common/accelerators/accelerator_table.h" 5 #include "ash/common/accelerators/accelerator_table.h"
6 6
7 #include "ash/strings/grit/ash_strings.h" 7 #include "ash/strings/grit/ash_strings.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 SHOW_KEYBOARD_OVERLAY}, 126 SHOW_KEYBOARD_OVERLAY},
127 {true, ui::VKEY_OEM_2, 127 {true, ui::VKEY_OEM_2,
128 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 128 ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
129 SHOW_KEYBOARD_OVERLAY}, 129 SHOW_KEYBOARD_OVERLAY},
130 {true, ui::VKEY_F14, ui::EF_NONE, SHOW_KEYBOARD_OVERLAY}, 130 {true, ui::VKEY_F14, ui::EF_NONE, SHOW_KEYBOARD_OVERLAY},
131 {true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, 131 {true, ui::VKEY_N, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
132 SHOW_MESSAGE_CENTER_BUBBLE}, 132 SHOW_MESSAGE_CENTER_BUBBLE},
133 {true, ui::VKEY_P, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SHOW_STYLUS_TOOLS}, 133 {true, ui::VKEY_P, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, SHOW_STYLUS_TOOLS},
134 {true, ui::VKEY_S, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, 134 {true, ui::VKEY_S, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
135 SHOW_SYSTEM_TRAY_BUBBLE}, 135 SHOW_SYSTEM_TRAY_BUBBLE},
136 {true, ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, 136 {true, ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_COMMAND_DOWN,
137 SHOW_IME_MENU_BUBBLE}, 137 SHOW_IME_MENU_BUBBLE},
138 {true, ui::VKEY_1, ui::EF_ALT_DOWN, LAUNCH_APP_0}, 138 {true, ui::VKEY_1, ui::EF_ALT_DOWN, LAUNCH_APP_0},
139 {true, ui::VKEY_2, ui::EF_ALT_DOWN, LAUNCH_APP_1}, 139 {true, ui::VKEY_2, ui::EF_ALT_DOWN, LAUNCH_APP_1},
140 {true, ui::VKEY_3, ui::EF_ALT_DOWN, LAUNCH_APP_2}, 140 {true, ui::VKEY_3, ui::EF_ALT_DOWN, LAUNCH_APP_2},
141 {true, ui::VKEY_4, ui::EF_ALT_DOWN, LAUNCH_APP_3}, 141 {true, ui::VKEY_4, ui::EF_ALT_DOWN, LAUNCH_APP_3},
142 {true, ui::VKEY_5, ui::EF_ALT_DOWN, LAUNCH_APP_4}, 142 {true, ui::VKEY_5, ui::EF_ALT_DOWN, LAUNCH_APP_4},
143 {true, ui::VKEY_6, ui::EF_ALT_DOWN, LAUNCH_APP_5}, 143 {true, ui::VKEY_6, ui::EF_ALT_DOWN, LAUNCH_APP_5},
144 {true, ui::VKEY_7, ui::EF_ALT_DOWN, LAUNCH_APP_6}, 144 {true, ui::VKEY_7, ui::EF_ALT_DOWN, LAUNCH_APP_6},
145 {true, ui::VKEY_8, ui::EF_ALT_DOWN, LAUNCH_APP_7}, 145 {true, ui::VKEY_8, ui::EF_ALT_DOWN, LAUNCH_APP_7},
146 {true, ui::VKEY_9, ui::EF_ALT_DOWN, LAUNCH_LAST_APP}, 146 {true, ui::VKEY_9, ui::EF_ALT_DOWN, LAUNCH_LAST_APP},
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // them about the deprecation (Add one in |ash_strings.grd|. Search for 187 // them about the deprecation (Add one in |ash_strings.grd|. Search for
188 // the comment <!-- Deprecated Accelerators Messages -->). 188 // the comment <!-- Deprecated Accelerators Messages -->).
189 // - The IDs of the localized old and new shortcut text to be used to fill 189 // - The IDs of the localized old and new shortcut text to be used to fill
190 // the notification text. Also found in |ash_strings.grd|. 190 // the notification text. Also found in |ash_strings.grd|.
191 // - {true or false} whether the deprecated accelerator is still enabled (we 191 // - {true or false} whether the deprecated accelerator is still enabled (we
192 // don't disable a deprecated accelerator abruptly). 192 // don't disable a deprecated accelerator abruptly).
193 // 5- Don't forget to update the keyboard overlay. Find 'shortcut' in the file 193 // 5- Don't forget to update the keyboard overlay. Find 'shortcut' in the file
194 // keyboard_overlay_data.js. 194 // keyboard_overlay_data.js.
195 const AcceleratorData kDeprecatedAccelerators[] = { 195 const AcceleratorData kDeprecatedAccelerators[] = {
196 {true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN}, 196 {true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN},
197 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER}}; 197 {true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER},
198
199 // Deprecated in M59.
200 {true, ui::VKEY_K, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN,
201 SHOW_IME_MENU_BUBBLE}};
198 202
199 const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators); 203 const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators);
200 204
201 const DeprecatedAcceleratorData kDeprecatedAcceleratorsData[] = { 205 const DeprecatedAcceleratorData kDeprecatedAcceleratorsData[] = {
202 { 206 {
203 LOCK_SCREEN, "Ash.Accelerators.Deprecated.LockScreen", 207 LOCK_SCREEN, "Ash.Accelerators.Deprecated.LockScreen",
204 IDS_DEPRECATED_LOCK_SCREEN_MSG, IDS_SHORTCUT_LOCK_SCREEN_OLD, 208 IDS_DEPRECATED_LOCK_SCREEN_MSG, IDS_SHORTCUT_LOCK_SCREEN_OLD,
205 IDS_SHORTCUT_LOCK_SCREEN_NEW, 209 IDS_SHORTCUT_LOCK_SCREEN_NEW,
206 false // Old accelerator was disabled in M56. 210 false // Old accelerator was disabled in M56.
207 }, 211 },
208 {SHOW_TASK_MANAGER, "Ash.Accelerators.Deprecated.ShowTaskManager", 212 {SHOW_TASK_MANAGER, "Ash.Accelerators.Deprecated.ShowTaskManager",
209 IDS_DEPRECATED_SHOW_TASK_MANAGER_MSG, IDS_SHORTCUT_TASK_MANAGER_OLD, 213 IDS_DEPRECATED_SHOW_TASK_MANAGER_MSG, IDS_SHORTCUT_TASK_MANAGER_OLD,
210 IDS_SHORTCUT_TASK_MANAGER_NEW, true}}; 214 IDS_SHORTCUT_TASK_MANAGER_NEW, true},
215 {SHOW_IME_MENU_BUBBLE, "Ash.Accelerators.Deprecated.ShowImeMenuBubble",
216 IDS_DEPRECATED_SHOW_IME_BUBBLE_MSG, IDS_SHORTCUT_IME_BUBBLE_OLD,
217 IDS_SHORTCUT_IME_BUBBLE_NEW, true}};
211 218
212 const size_t kDeprecatedAcceleratorsDataLength = 219 const size_t kDeprecatedAcceleratorsDataLength =
213 arraysize(kDeprecatedAcceleratorsData); 220 arraysize(kDeprecatedAcceleratorsData);
214 221
215 const AcceleratorData kDebugAcceleratorData[] = { 222 const AcceleratorData kDebugAcceleratorData[] = {
216 {true, ui::VKEY_N, kDebugModifier, TOGGLE_WIFI}, 223 {true, ui::VKEY_N, kDebugModifier, TOGGLE_WIFI},
217 {true, ui::VKEY_O, kDebugModifier, DEBUG_SHOW_TOAST}, 224 {true, ui::VKEY_O, kDebugModifier, DEBUG_SHOW_TOAST},
218 {true, ui::VKEY_P, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN, 225 {true, ui::VKEY_P, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN,
219 DEBUG_TOGGLE_TOUCH_PAD}, 226 DEBUG_TOGGLE_TOUCH_PAD},
220 {true, ui::VKEY_T, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN, 227 {true, ui::VKEY_T, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN,
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 TOGGLE_SPOKEN_FEEDBACK, 501 TOGGLE_SPOKEN_FEEDBACK,
495 TOGGLE_WIFI, 502 TOGGLE_WIFI,
496 VOLUME_DOWN, 503 VOLUME_DOWN,
497 VOLUME_MUTE, 504 VOLUME_MUTE,
498 VOLUME_UP, 505 VOLUME_UP,
499 }; 506 };
500 507
501 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); 508 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen);
502 509
503 } // namespace ash 510 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_strings.grd ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698