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 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 16 matching lines...) Expand all Loading... |
27 enum class DomCode; | 27 enum class DomCode; |
28 }; | 28 }; |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 namespace input_method { | 31 namespace input_method { |
32 class ImeKeyboard; | 32 class ImeKeyboard; |
33 } | 33 } |
34 | 34 |
35 // EventRewriter makes various changes to keyboard-related events, | 35 // EventRewriter makes various changes to keyboard-related events, |
36 // including KeyEvents and some other events with keyboard modifier flags: | 36 // including KeyEvents and some other events with keyboard modifier flags: |
37 // - maps modifiers keys (Control, Alt, Search, Caps, Diamond) according | 37 // - maps certain non-character keys according to user preferences |
38 // to user preferences; | 38 // (Control, Alt, Search, Caps Lock, Escape, Backspace, Diamond); |
39 // - maps Command to Control on Apple keyboards; | 39 // - maps Command to Control on Apple keyboards; |
40 // - converts numeric pad editing keys to their numeric forms; | 40 // - converts numeric pad editing keys to their numeric forms; |
41 // - converts top-row function keys to special keys where necessary; | 41 // - converts top-row function keys to special keys where necessary; |
42 // - handles various key combinations like Search+Backspace -> Delete | 42 // - handles various key combinations like Search+Backspace -> Delete |
43 // and Search+number to Fnumber; | 43 // and Search+number to Fnumber; |
44 // - handles key/pointer combinations like Alt+Button1 -> Button3. | 44 // - handles key/pointer combinations like Alt+Button1 -> Button3. |
45 class EventRewriter : public ui::EventRewriter { | 45 class EventRewriter : public ui::EventRewriter { |
46 public: | 46 public: |
47 enum DeviceType { | 47 enum DeviceType { |
48 kDeviceUnknown = 0, | 48 kDeviceUnknown = 0, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 int pressed_modifier_latches_; | 200 int pressed_modifier_latches_; |
201 int latched_modifier_latches_; | 201 int latched_modifier_latches_; |
202 int used_modifier_latches_; | 202 int used_modifier_latches_; |
203 | 203 |
204 DISALLOW_COPY_AND_ASSIGN(EventRewriter); | 204 DISALLOW_COPY_AND_ASSIGN(EventRewriter); |
205 }; | 205 }; |
206 | 206 |
207 } // namespace chromeos | 207 } // namespace chromeos |
208 | 208 |
209 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ | 209 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_H_ |
OLD | NEW |