OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" | 5 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" |
6 | 6 |
7 #include <linux/input.h> | 7 #include <linux/input.h> |
8 | 8 |
9 #include "ui/events/event.h" | 9 #include "ui/events/event.h" |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool down = modifiers_down_[modifier]; | 64 bool down = modifiers_down_[modifier]; |
65 bool locked = (modifier_flags_locked_ & mask); | 65 bool locked = (modifier_flags_locked_ & mask); |
66 if (down != locked) | 66 if (down != locked) |
67 modifier_flags_ |= mask; | 67 modifier_flags_ |= mask; |
68 else | 68 else |
69 modifier_flags_ &= ~mask; | 69 modifier_flags_ &= ~mask; |
70 } | 70 } |
71 | 71 |
72 int EventModifiersEvdev::GetModifierFlags() { return modifier_flags_; } | 72 int EventModifiersEvdev::GetModifierFlags() { return modifier_flags_; } |
73 | 73 |
| 74 // static |
| 75 int EventModifiersEvdev::GetEventFlagFromModifier(unsigned int modifier) { |
| 76 return kEventFlagFromModifiers[modifier]; |
| 77 } |
| 78 |
74 } // namespace ui | 79 } // namespace ui |
OLD | NEW |