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" |
| 11 #include "ui/events/keycodes/keyboard_code_conversion.h" |
11 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" | 12 #include "ui/events/ozone/evdev/event_modifiers_evdev.h" |
12 #include "ui/events/ozone/evdev/keyboard_util_evdev.h" | 13 #include "ui/events/ozone/evdev/keyboard_util_evdev.h" |
13 #include "ui/events/ozone/layout/keyboard_layout_engine.h" | 14 #include "ui/events/ozone/layout/keyboard_layout_engine.h" |
14 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | 15 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" |
15 #include "ui/events/ozone/layout/layout_util.h" | |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 const int kRepeatDelayMs = 500; | 21 const int kRepeatDelayMs = 500; |
22 const int kRepeatIntervalMs = 50; | 22 const int kRepeatIntervalMs = 50; |
23 | 23 |
24 int EventFlagToEvdevModifier(int flag) { | 24 int EventFlagToEvdevModifier(int flag) { |
25 switch (flag) { | 25 switch (flag) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down); | 189 UpdateModifier(ModifierDomKeyToEventFlag(dom_key), down); |
190 | 190 |
191 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code, | 191 KeyEvent event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, key_code, dom_code, |
192 modifiers_->GetModifierFlags(), dom_key, character, timestamp); | 192 modifiers_->GetModifierFlags(), dom_key, character, timestamp); |
193 if (platform_keycode) | 193 if (platform_keycode) |
194 event.set_platform_keycode(platform_keycode); | 194 event.set_platform_keycode(platform_keycode); |
195 callback_.Run(&event); | 195 callback_.Run(&event); |
196 } | 196 } |
197 | 197 |
198 } // namespace ui | 198 } // namespace ui |
OLD | NEW |