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

Unified Diff: ui/chromeos/events/event_rewriter_chromeos.cc

Issue 2763483002: Fix Caps Lock bug (Closed)
Patch Set: Applying the fix 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: ui/chromeos/events/event_rewriter_chromeos.cc
diff --git a/ui/chromeos/events/event_rewriter_chromeos.cc b/ui/chromeos/events/event_rewriter_chromeos.cc
index 65c908087e5530874e019ec5c3e80a280164b3b4..9e80e603b5e5c9f4ac22dfd5343847ba7d433f08 100644
--- a/ui/chromeos/events/event_rewriter_chromeos.cc
+++ b/ui/chromeos/events/event_rewriter_chromeos.cc
@@ -804,24 +804,6 @@ bool EventRewriterChromeOS::RewriteModifierKeys(const ui::KeyEvent& key_event,
used_modifier_latches_ |= pressed_modifier_latches_;
latched_modifier_latches_ = ui::EF_NONE;
}
- // Toggle Caps Lock if the remapped key is ui::VKEY_CAPITAL.
- if (state->key_code == ui::VKEY_CAPITAL
- // ... except on linux Chrome OS, where InputMethodChromeOS handles it.
- && (base::SysInfo::IsRunningOnChromeOS() || ime_keyboard_for_testing_)
-#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
oshima 2017/04/11 19:04:47 Did you consult with the author of this code? Plea
kpschoedel 2017/04/11 21:56:00 (original author) I believe this can be removed be
oshima 2017/04/11 22:24:54 Many ChromeOS UI devs are still using linux+x11 de
weidongg 2017/04/11 22:55:43 I am sorry, I am still confused about these terms
- ) {
- ::chromeos::input_method::ImeKeyboard* ime_keyboard =
- ime_keyboard_for_testing_
- ? ime_keyboard_for_testing_
- : ::chromeos::input_method::InputMethodManager::Get()
- ->GetImeKeyboard();
- ime_keyboard->SetCapsLockEnabled(!ime_keyboard->CapsLockIsEnabled());
- }
}
return exact_event;
}

Powered by Google App Engine
This is Rietveld 408576698