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 UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ |
7 | 7 |
8 #include <bitset> | 8 #include <bitset> |
9 #include <linux/input.h> | 9 #include <linux/input.h> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Configuration for key repeat. | 46 // Configuration for key repeat. |
47 bool IsAutoRepeatEnabled(); | 47 bool IsAutoRepeatEnabled(); |
48 void SetAutoRepeatEnabled(bool enabled); | 48 void SetAutoRepeatEnabled(bool enabled); |
49 void SetAutoRepeatRate(const base::TimeDelta& delay, | 49 void SetAutoRepeatRate(const base::TimeDelta& delay, |
50 const base::TimeDelta& interval); | 50 const base::TimeDelta& interval); |
51 void GetAutoRepeatRate(base::TimeDelta* delay, base::TimeDelta* interval); | 51 void GetAutoRepeatRate(base::TimeDelta* delay, base::TimeDelta* interval); |
52 | 52 |
53 private: | 53 private: |
54 void UpdateModifier(int modifier_flag, bool down); | 54 void UpdateModifier(int modifier_flag, bool down); |
| 55 void UpdateCapsLockLed(); |
55 void UpdateKeyRepeat(unsigned int key, bool down); | 56 void UpdateKeyRepeat(unsigned int key, bool down); |
56 void StartKeyRepeat(unsigned int key); | 57 void StartKeyRepeat(unsigned int key); |
57 void StopKeyRepeat(); | 58 void StopKeyRepeat(); |
58 void OnRepeatDelayTimeout(); | 59 void OnRepeatDelayTimeout(); |
59 void OnRepeatIntervalTimeout(); | 60 void OnRepeatIntervalTimeout(); |
60 void DispatchKey(unsigned int key, | 61 void DispatchKey(unsigned int key, |
61 bool down, | 62 bool down, |
62 bool repeat, | 63 bool repeat, |
63 base::TimeDelta timestamp); | 64 base::TimeDelta timestamp); |
64 | 65 |
(...skipping 22 matching lines...) Expand all Loading... |
87 base::TimeDelta repeat_interval_; | 88 base::TimeDelta repeat_interval_; |
88 base::OneShotTimer<KeyboardEvdev> repeat_delay_timer_; | 89 base::OneShotTimer<KeyboardEvdev> repeat_delay_timer_; |
89 base::RepeatingTimer<KeyboardEvdev> repeat_interval_timer_; | 90 base::RepeatingTimer<KeyboardEvdev> repeat_interval_timer_; |
90 | 91 |
91 DISALLOW_COPY_AND_ASSIGN(KeyboardEvdev); | 92 DISALLOW_COPY_AND_ASSIGN(KeyboardEvdev); |
92 }; | 93 }; |
93 | 94 |
94 } // namespace ui | 95 } // namespace ui |
95 | 96 |
96 #endif // UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ | 97 #endif // UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ |
OLD | NEW |