Index: ash/accelerators/accelerator_table.cc |
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc |
index 35888ede8d3a993d98176bcfa600d09b68f7788f..72d511e8acf606c5cddf29a3d89699d8c9c94916 100644 |
--- a/ash/accelerators/accelerator_table.cc |
+++ b/ash/accelerators/accelerator_table.cc |
@@ -10,16 +10,6 @@ |
namespace ash { |
const AcceleratorData kAcceleratorData[] = { |
- // We have to define 3 entries for Shift+Alt. VKEY_[LR]MENU might be sent to |
- // the accelerator controller when RenderWidgetHostViewAura is focused, and |
- // VKEY_MENU might be when it's not (e.g. when NativeWidgetAura is focused). |
- { false, ui::VKEY_LMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
- { false, ui::VKEY_MENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
- { false, ui::VKEY_RMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
- // The same is true for Alt+Shift. |
- { false, ui::VKEY_LSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
- { false, ui::VKEY_SHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
- { false, ui::VKEY_RSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
{ true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, PREVIOUS_IME }, |
{ false, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN, PREVIOUS_IME }, |
// Shortcuts for Japanese IME. |
@@ -102,11 +92,24 @@ const AcceleratorData kAcceleratorData[] = { |
{ true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN }, |
{ true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP }, |
{ true, ui::VKEY_ESCAPE, ui::EF_COMMAND_DOWN, SHOW_TASK_MANAGER }, |
+ { true, ui::VKEY_SPACE, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, NEXT_IME }, |
#else |
// This key has been deprecated on CrOS. It is instead included below in the |
// |kDeprecatedAccelerators|, and above in the CrOS accelerators as |
// Search+Esc. |
{ true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER }, |
+ // The below keys have been deprecated on ChromeOS and were replaced above by |
+ // Ctrl+Shift+Space. |
+ // We have to define 3 entries for Shift+Alt. VKEY_[LR]MENU might be sent to |
+ // the accelerator controller when RenderWidgetHostViewAura is focused, and |
+ // VKEY_MENU might be when it's not (e.g. when NativeWidgetAura is focused). |
+ { false, ui::VKEY_LMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_MENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_RMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ // The same is true for Alt+Shift. |
+ { false, ui::VKEY_LSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_SHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_RSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
#endif // defined(OS_CHROMEOS) |
{ true, ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN, OPEN_FEEDBACK_PAGE }, |
#if !defined(OS_WIN) |
@@ -188,8 +191,9 @@ const size_t kAcceleratorDataLength = arraysize(kAcceleratorData); |
// 1- Replace the old deprecated accelerator from the above list with the new |
// accelerator that will take its place. |
// 2- Add an entry for it in the following |kDeprecatedAccelerators| list. |
-// 3- That entry should contain the following: |
-// - The deprecated accelerator data you removed from above. |
+// 3- Add another entry in the |kDeprecatedAcceleratorsData|. |
+// 4- That entry should contain the following: |
+// - The action that the deprecated accelerator maps to. |
// - Define a histogram for this action in |histograms.xml| in the form |
// "Ash.Accelerators.Deprecated.{ActionName}" and include the name of this |
// histogram in this entry. This name will be used as the ID of the |
@@ -200,25 +204,45 @@ const size_t kAcceleratorDataLength = arraysize(kAcceleratorData); |
// Search for the comment <!-- Deprecated Accelerators Messages -->). |
// - {true or false} whether the deprecated accelerator is still enabled (we |
// don't disable a deprecated accelerator abruptly). |
-// 4- Don't forget to update the keyboard overlay. |
+// 5- Don't forget to update the keyboard overlay. |
#if defined(OS_CHROMEOS) |
-const DeprecatedAcceleratorData kDeprecatedAccelerators[] = { |
+const AcceleratorData kDeprecatedAccelerators[] = { |
+ { true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN }, |
+ { true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER }, |
+ { false, ui::VKEY_LMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_MENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_RMENU, ui::EF_SHIFT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_LSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_SHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
+ { false, ui::VKEY_RSHIFT, ui::EF_ALT_DOWN, NEXT_IME }, |
+}; |
+ |
+const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators); |
+ |
+const DeprecatedAcceleratorData kDeprecatedAcceleratorsData[] = { |
{ |
- { true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN }, |
+ LOCK_SCREEN, |
"Ash.Accelerators.Deprecated.LockScreen", |
IDS_DEPRECATED_LOCK_SCREEN_MSG, |
true |
}, |
{ |
- { true, ui::VKEY_ESCAPE, ui::EF_SHIFT_DOWN, SHOW_TASK_MANAGER }, |
+ SHOW_TASK_MANAGER, |
"Ash.Accelerators.Deprecated.ShowTaskManager", |
IDS_DEPRECATED_SHOW_TASK_MANAGER_MSG, |
true |
}, |
+ { |
+ NEXT_IME, |
+ "Ash.Accelerators.Deprecated.NextIME", |
+ IDS_DEPRECATED_NEXT_IME_MSG, |
+ true |
+ } |
}; |
-const size_t kDeprecatedAcceleratorsLength = arraysize(kDeprecatedAccelerators); |
+const size_t kDeprecatedAcceleratorsDataLength = |
+ arraysize(kDeprecatedAcceleratorsData); |
#endif // defined(OS_CHROMEOS) |