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

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

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix Created 4 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
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 fbcc6c97858e0b3cdfbd30ec0bdc7745241b1f5f..1538cce0ac2e87d45f56c65722fc33d5f2ddaa76 100644
--- a/ui/events/ozone/evdev/keyboard_evdev.cc
+++ b/ui/events/ozone/evdev/keyboard_evdev.cc
@@ -34,18 +34,20 @@ const int kRepeatIntervalMs = 50;
int EventFlagToEvdevModifier(int flag) {
switch (flag) {
- case EF_CAPS_LOCK_DOWN:
- return EVDEV_MODIFIER_CAPS_LOCK;
case EF_SHIFT_DOWN:
return EVDEV_MODIFIER_SHIFT;
case EF_CONTROL_DOWN:
return EVDEV_MODIFIER_CONTROL;
case EF_ALT_DOWN:
return EVDEV_MODIFIER_ALT;
+ case EF_COMMAND_DOWN:
+ return EVDEV_MODIFIER_COMMAND;
case EF_ALTGR_DOWN:
return EVDEV_MODIFIER_ALTGR;
case EF_MOD3_DOWN:
return EVDEV_MODIFIER_MOD3;
+ case EF_CAPS_LOCK_ON:
+ return EVDEV_MODIFIER_CAPS_LOCK;
case EF_LEFT_MOUSE_BUTTON:
return EVDEV_MODIFIER_LEFT_MOUSE_BUTTON;
case EF_MIDDLE_MOUSE_BUTTON:
@@ -56,8 +58,6 @@ int EventFlagToEvdevModifier(int flag) {
return EVDEV_MODIFIER_BACK_MOUSE_BUTTON;
case EF_FORWARD_MOUSE_BUTTON:
return EVDEV_MODIFIER_FORWARD_MOUSE_BUTTON;
- case EF_COMMAND_DOWN:
- return EVDEV_MODIFIER_COMMAND;
default:
return EVDEV_MODIFIER_NONE;
}
@@ -102,7 +102,7 @@ void KeyboardEvdev::SetCapsLockEnabled(bool enabled) {
}
bool KeyboardEvdev::IsCapsLockEnabled() {
- return (modifiers_->GetModifierFlags() & EF_CAPS_LOCK_DOWN) != 0;
+ return (modifiers_->GetModifierFlags() & EF_CAPS_LOCK_ON) != 0;
}
bool KeyboardEvdev::IsAutoRepeatEnabled() {
@@ -141,7 +141,7 @@ void KeyboardEvdev::UpdateModifier(int modifier_flag, bool 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
+ // and EF_CAPS_LOCK_ON 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

Powered by Google App Engine
This is Rietveld 408576698