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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11580005: Don't fire Alt-Search binding when Alt-Search is being used for accessing a modifer key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index fbe39d16a2bef57acd9b520adb457ee134d8c662..656dbc7e7cc926df1f0a42ffc3bb38ad3ca97649 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -583,6 +583,15 @@ bool AcceleratorController::PerformAction(int action,
}
return false;
case TOGGLE_CAPS_LOCK:
+ if (key_code == ui::VKEY_LWIN) {
+ // If something else was pressed between the Search key (LWIN)
+ // being pressed and released, then ignore the release of the
+ // Search key.
+ // TODO(danakj): Releasing Alt first breaks this: crbug.com/166495
+ if (previous_event_type == ui::ET_KEY_RELEASED ||
+ previous_key_code != ui::VKEY_LWIN)
+ return false;
+ }
shell->caps_lock_delegate()->ToggleCapsLock();
return true;
case BRIGHTNESS_DOWN:
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698