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

Unified Diff: ash/common/accelerators/accelerator_table.cc

Issue 2686833005: Fix the toggle caps lock accelerator not always working. (Closed)
Patch Set: Nits Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_table.cc
diff --git a/ash/common/accelerators/accelerator_table.cc b/ash/common/accelerators/accelerator_table.cc
index 602a3249dc9a8d94dd47d466516c3908b3a67f01..b82bb51cae1960f2fc307f1d1a9277d5853d634a 100644
--- a/ash/common/accelerators/accelerator_table.cc
+++ b/ash/common/accelerators/accelerator_table.cc
@@ -84,7 +84,14 @@ const AcceleratorData kAcceleratorData[] = {
{false, ui::VKEY_LSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK},
{false, ui::VKEY_SHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK},
{false, ui::VKEY_RSHIFT, ui::EF_NONE, DISABLE_CAPS_LOCK},
+ // Accelerators to toggle Caps Lock.
+ // The following is triggered when Search is released while Alt is still
+ // down. The key_code here is LWIN (for search) and Alt is a modifier.
{false, ui::VKEY_LWIN, ui::EF_ALT_DOWN, TOGGLE_CAPS_LOCK},
+ // The following is triggered when Alt is released while search is still
+ // down. The key_code here is MENU (for Alt) and Search is a modifier
+ // (EF_COMMAND_DOWN is used for Search as a modifier).
+ {false, ui::VKEY_MENU, ui::EF_COMMAND_DOWN, TOGGLE_CAPS_LOCK},
{true, ui::VKEY_VOLUME_MUTE, ui::EF_NONE, VOLUME_MUTE},
{true, ui::VKEY_VOLUME_DOWN, ui::EF_NONE, VOLUME_DOWN},
{true, ui::VKEY_VOLUME_UP, ui::EF_NONE, VOLUME_UP},
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698