| 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);
|
| }
|
|
|