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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove DropSearchKey function Created 8 years, 1 month 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/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index f6199cc4e3024597da006da8b2c15bc9c4db337e..493e2bfc54b12cfd6e6ccc16a67e94d8f2c261f2 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -534,6 +534,15 @@ bool AcceleratorController::PerformAction(int action,
// this key combination is reserved for partial screenshot.
return true;
case TOGGLE_APP_LIST:
+ // See: case NEXT_IME.
+ if (previous_event_type == ui::ET_KEY_RELEASED ||
+ // The LWIN binding is on release. If something else was pressed since
+ // the LWIN key, then we should ignore the release of LWIN.
+ (accelerator.type() == ui::ET_KEY_RELEASED &&
+ context_.previous_accelerator().key_code() != ui::VKEY_LWIN)) {
+ // We totally ignore this accelerator.
+ return false;
+ }
if (key_code == ui::VKEY_LWIN && shell->delegate())
shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_SEARCH_LWIN);
// When spoken feedback is enabled, we should neither toggle the list nor
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | ash/accelerators/accelerator_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698