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/keyboard_evdev.h" | 5 #include "ui/events/ozone/evdev/keyboard_evdev.h" |
6 | 6 |
7 #include "ui/events/event.h" | 7 #include "ui/events/event.h" |
8 #include "ui/events/event_constants.h" | 8 #include "ui/events/event_constants.h" |
9 #include "ui/events/event_utils.h" | 9 #include "ui/events/event_utils.h" |
10 #include "ui/events/keycodes/dom4/keycode_converter.h" | 10 #include "ui/events/keycodes/dom4/keycode_converter.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 case EF_ALT_DOWN: | 32 case EF_ALT_DOWN: |
33 return EVDEV_MODIFIER_ALT; | 33 return EVDEV_MODIFIER_ALT; |
34 case EF_ALTGR_DOWN: | 34 case EF_ALTGR_DOWN: |
35 return EVDEV_MODIFIER_ALTGR; | 35 return EVDEV_MODIFIER_ALTGR; |
36 case EF_LEFT_MOUSE_BUTTON: | 36 case EF_LEFT_MOUSE_BUTTON: |
37 return EVDEV_MODIFIER_LEFT_MOUSE_BUTTON; | 37 return EVDEV_MODIFIER_LEFT_MOUSE_BUTTON; |
38 case EF_MIDDLE_MOUSE_BUTTON: | 38 case EF_MIDDLE_MOUSE_BUTTON: |
39 return EVDEV_MODIFIER_MIDDLE_MOUSE_BUTTON; | 39 return EVDEV_MODIFIER_MIDDLE_MOUSE_BUTTON; |
40 case EF_RIGHT_MOUSE_BUTTON: | 40 case EF_RIGHT_MOUSE_BUTTON: |
41 return EVDEV_MODIFIER_RIGHT_MOUSE_BUTTON; | 41 return EVDEV_MODIFIER_RIGHT_MOUSE_BUTTON; |
| 42 case EF_BACK_MOUSE_BUTTON: |
| 43 return EVDEV_MODIFIER_BACK_MOUSE_BUTTON; |
| 44 case EF_FORWARD_MOUSE_BUTTON: |
| 45 return EVDEV_MODIFIER_FORWARD_MOUSE_BUTTON; |
42 case EF_COMMAND_DOWN: | 46 case EF_COMMAND_DOWN: |
43 return EVDEV_MODIFIER_COMMAND; | 47 return EVDEV_MODIFIER_COMMAND; |
44 default: | 48 default: |
45 return EVDEV_MODIFIER_NONE; | 49 return EVDEV_MODIFIER_NONE; |
46 } | 50 } |
47 } | 51 } |
48 | 52 |
49 } // namespace | 53 } // namespace |
50 | 54 |
51 KeyboardEvdev::KeyboardEvdev(EventModifiersEvdev* modifiers, | 55 KeyboardEvdev::KeyboardEvdev(EventModifiersEvdev* modifiers, |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down); | 196 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down); |
193 | 197 |
194 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code, | 198 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code, |
195 modifiers_->GetModifierFlags(), dom_key, character, timestamp); | 199 modifiers_->GetModifierFlags(), dom_key, character, timestamp); |
196 if (platform_keycode) | 200 if (platform_keycode) |
197 event.set_platform_keycode(platform_keycode); | 201 event.set_platform_keycode(platform_keycode); |
198 callback_.Run(&event); | 202 callback_.Run(&event); |
199 } | 203 } |
200 | 204 |
201 } // namespace ui | 205 } // namespace ui |
OLD | NEW |