xref: /haiku/src/preferences/input/KeyboardSettings.h (revision caed67a8cba83913b9c21ac2b06ebc6bd1cb3111)
1 /*
2  * Copyright 2004-2006, the Haiku project. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors in chronological order:
6  *  mccall@digitalparadise.co.uk
7  *  Jérôme Duval
8  *  Marcus Overhagen
9  */
10 
11 
12 #ifndef KEYBOARD_SETTINGS_H_
13 #define KEYBOARD_SETTINGS_H_
14 
15 #include <SupportDefs.h>
16 
17 #include "kb_mouse_settings.h"
18 
19 class KeyboardSettings {
20 public :
21 	KeyboardSettings();
22 	~KeyboardSettings();
23 
24 	void Revert();
25 	void Defaults();
26 	bool IsDefaultable() const;
27 
28 	int32 KeyboardRepeatRate() const
29 		{ return fSettings.key_repeat_rate; }
30 	void SetKeyboardRepeatRate(int32 rate);
31 
32 	bigtime_t KeyboardRepeatDelay() const
33 		{ return fSettings.key_repeat_delay; }
34 	void SetKeyboardRepeatDelay(bigtime_t delay);
35 
36 private:
37 	kb_settings			fSettings;
38 	kb_settings			fOriginalSettings;
39 };
40 
41 #endif
42