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

Unified Diff: chrome/browser/chromeos/system_key_event_listener.cc

Issue 9839062: Merge 123866 - Ignore Shift+Search when spoken feedback is enabled (non-Aura). (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system_key_event_listener.cc
===================================================================
--- chrome/browser/chromeos/system_key_event_listener.cc (revision 128517)
+++ chrome/browser/chromeos/system_key_event_listener.cc (working copy)
@@ -10,6 +10,7 @@
#include <X11/XKBlib.h>
#undef Status
+#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
#include "chrome/browser/chromeos/audio/audio_handler.h"
#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
#include "chrome/browser/chromeos/dbus/power_manager_client.h"
@@ -342,9 +343,16 @@
if (XKeycodeToKeysym(ui::GetXDisplay(), keycode, 0) == XK_Super_L) {
const bool shift_is_held = (state & ShiftMask);
const bool other_mods_are_held = (state & ~(ShiftMask | LockMask));
- if (shift_is_held && !other_mods_are_held)
+
+ // When spoken feedback is enabled, the Search key is used as an
+ // accessibility modifier key.
+ const bool accessibility_enabled =
+ accessibility::IsSpokenFeedbackEnabled();
+
+ if (shift_is_held && !other_mods_are_held && !accessibility_enabled) {
input_method_manager->GetXKeyboard()->SetCapsLockEnabled(
!caps_lock_is_on_);
+ }
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698