| 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 0132616cb6eb381e5e3cd282cca7fa37fcccfbe5..7b25feab396f7849f7312cd14c3da874998fc197 100644
|
| --- a/ui/events/ozone/evdev/keyboard_evdev.cc
|
| +++ b/ui/events/ozone/evdev/keyboard_evdev.cc
|
| @@ -46,10 +46,6 @@ int EventFlagToEvdevModifier(int flag) {
|
| }
|
| }
|
|
|
| -bool IsModifierLock(int evdev_modifier) {
|
| - return evdev_modifier == EVDEV_MODIFIER_CAPS_LOCK;
|
| -}
|
| -
|
| } // namespace
|
|
|
| KeyboardEvdev::KeyboardEvdev(EventModifiersEvdev* modifiers,
|
| @@ -122,8 +118,15 @@ void KeyboardEvdev::UpdateModifier(int modifier_flag, bool down) {
|
| if (modifier == EVDEV_MODIFIER_NONE)
|
| return;
|
|
|
| - if (IsModifierLock(modifier))
|
| - modifiers_->UpdateModifierLock(modifier, down);
|
| + // 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);
|
| else
|
| modifiers_->UpdateModifier(modifier, down);
|
| }
|
|
|