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

Unified Diff: chrome/browser/chromeos/events/event_rewriter.cc

Issue 878673004: Handle Caps Lock for Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove spurious file Created 5 years, 11 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 | ui/base/ime/chromeos/ime_keyboard_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/events/event_rewriter.cc
diff --git a/chrome/browser/chromeos/events/event_rewriter.cc b/chrome/browser/chromeos/events/event_rewriter.cc
index eb7dfc3817e86ce1ae00e66b797fd7da7d0cbf0c..b0b8531d9c45aa7a163dd4718b60bf83e0102d2d 100644
--- a/chrome/browser/chromeos/events/event_rewriter.cc
+++ b/chrome/browser/chromeos/events/event_rewriter.cc
@@ -689,11 +689,14 @@ void EventRewriter::RewriteModifierKeys(const ui::KeyEvent& key_event,
else
state->flags &= ~characteristic_flag;
- // Toggle Caps Lock if the remapped key is ui::VKEY_CAPITAL, but do nothing if
- // the original key is ui::VKEY_CAPITAL (i.e. a Caps Lock key on an external
- // keyboard is pressed) since X can handle that case.
+ // Toggle Caps Lock if the remapped key is ui::VKEY_CAPITAL.
if (key_event.type() == ui::ET_KEY_PRESSED &&
+#if defined(USE_X11)
+ // ... but for X11, do nothing if the original key is ui::VKEY_CAPITAL
+ // (i.e. a Caps Lock key on an external keyboard is pressed) since X
+ // handles that itself.
incoming.key_code != ui::VKEY_CAPITAL &&
+#endif
state->key_code == ui::VKEY_CAPITAL) {
chromeos::input_method::ImeKeyboard* ime_keyboard =
ime_keyboard_for_testing_
« no previous file with comments | « no previous file | ui/base/ime/chromeos/ime_keyboard_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698