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

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

Issue 2763483002: Fix Caps Lock bug (Closed)
Patch Set: Add unit test for Caps Lock in accelerator. 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/accelerators/accelerator_table.cc
diff --git a/ash/common/accelerators/accelerator_table.cc b/ash/common/accelerators/accelerator_table.cc
index a44a3a0b36a1fa0558524bdab2f66c2d68b7f3a1..0e936058e1593b4ebb8f27e2305ce1ace1c6d8cb 100644
--- a/ash/common/accelerators/accelerator_table.cc
+++ b/ash/common/accelerators/accelerator_table.cc
@@ -91,6 +91,10 @@ const AcceleratorData kAcceleratorData[] = {
// 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},
+ // The following is triggered when Caps Lock is released. The key_code here
+ // was rewrote by event rewriter if Caps Lock is mapped from another
afakhry 2017/04/07 23:31:42 rewrote --> rewritten. However, you don't need th
weidongg 2017/04/08 00:15:07 Deleted.
+ // physical key.
+ {false, ui::VKEY_CAPITAL, ui::EF_NONE, 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},

Powered by Google App Engine
This is Rietveld 408576698