Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: ui/events/ozone/evdev/keyboard_evdev.h

Issue 985163002: ozone: evdev: Fix possibility of stuck keys (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 class EVENTS_OZONE_EVDEV_EXPORT KeyboardEvdev { 29 class EVENTS_OZONE_EVDEV_EXPORT KeyboardEvdev {
30 public: 30 public:
31 KeyboardEvdev(EventModifiersEvdev* modifiers, 31 KeyboardEvdev(EventModifiersEvdev* modifiers,
32 KeyboardLayoutEngine* keyboard_layout_engine, 32 KeyboardLayoutEngine* keyboard_layout_engine,
33 const EventDispatchCallback& callback); 33 const EventDispatchCallback& callback);
34 ~KeyboardEvdev(); 34 ~KeyboardEvdev();
35 35
36 // Handlers for raw key presses & releases. 36 // Handlers for raw key presses & releases.
37 void OnKeyChange(unsigned int code, bool down, base::TimeDelta timestamp); 37 void OnKeyChange(unsigned int code, bool down, base::TimeDelta timestamp);
38 38
39 // Release all pressed keys.
40 void Reset();
41
42 // Handle Caps Lock modifier. 39 // Handle Caps Lock modifier.
43 void SetCapsLockEnabled(bool enabled); 40 void SetCapsLockEnabled(bool enabled);
44 bool IsCapsLockEnabled(); 41 bool IsCapsLockEnabled();
45 42
46 // Configuration for key repeat. 43 // Configuration for key repeat.
47 bool IsAutoRepeatEnabled(); 44 bool IsAutoRepeatEnabled();
48 void SetAutoRepeatEnabled(bool enabled); 45 void SetAutoRepeatEnabled(bool enabled);
49 void SetAutoRepeatRate(const base::TimeDelta& delay, 46 void SetAutoRepeatRate(const base::TimeDelta& delay,
50 const base::TimeDelta& interval); 47 const base::TimeDelta& interval);
51 void GetAutoRepeatRate(base::TimeDelta* delay, base::TimeDelta* interval); 48 void GetAutoRepeatRate(base::TimeDelta* delay, base::TimeDelta* interval);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 base::TimeDelta repeat_interval_; 85 base::TimeDelta repeat_interval_;
89 base::OneShotTimer<KeyboardEvdev> repeat_delay_timer_; 86 base::OneShotTimer<KeyboardEvdev> repeat_delay_timer_;
90 base::RepeatingTimer<KeyboardEvdev> repeat_interval_timer_; 87 base::RepeatingTimer<KeyboardEvdev> repeat_interval_timer_;
91 88
92 DISALLOW_COPY_AND_ASSIGN(KeyboardEvdev); 89 DISALLOW_COPY_AND_ASSIGN(KeyboardEvdev);
93 }; 90 };
94 91
95 } // namespace ui 92 } // namespace ui
96 93
97 #endif // UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_ 94 #endif // UI_EVENTS_OZONE_EVDEV_KEYBOARD_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.cc ('k') | ui/events/ozone/evdev/keyboard_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698