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

Unified Diff: ui/events/ozone/evdev/keyboard_evdev.cc

Issue 965473002: Revert of Fix CapsLock remapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « ui/events/ozone/evdev/event_modifiers_evdev.cc ('k') | ui/events/ozone/layout/layout_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/keyboard_evdev.cc
diff --git a/ui/events/ozone/evdev/keyboard_evdev.cc b/ui/events/ozone/evdev/keyboard_evdev.cc
index 7b25feab396f7849f7312cd14c3da874998fc197..0132616cb6eb381e5e3cd282cca7fa37fcccfbe5 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -44,6 +44,10 @@
default:
return EVDEV_MODIFIER_NONE;
}
+}
+
+bool IsModifierLock(int evdev_modifier) {
+ return evdev_modifier == EVDEV_MODIFIER_CAPS_LOCK;
}
} // namespace
@@ -118,15 +122,8 @@
if (modifier == EVDEV_MODIFIER_NONE)
return;
- // TODO post-X11: Revise remapping to not use EF_MOD3_DOWN.
- // Currently EF_MOD3_DOWN means that the CapsLock key is currently down,
- // and EF_CAPS_LOCK_DOWN means the caps lock state is enabled (and the
- // key may or may not be down, but usually isn't). There does need to
- // to be two different flags, since the physical CapsLock key is subject
- // to remapping, but the caps lock state (which can be triggered in a
- // variety of ways) is not.
- if (modifier == EVDEV_MODIFIER_CAPS_LOCK)
- modifiers_->UpdateModifier(EVDEV_MODIFIER_MOD3, down);
+ if (IsModifierLock(modifier))
+ modifiers_->UpdateModifierLock(modifier, down);
else
modifiers_->UpdateModifier(modifier, down);
}
« no previous file with comments | « ui/events/ozone/evdev/event_modifiers_evdev.cc ('k') | ui/events/ozone/layout/layout_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698