xref: /haiku/src/preferences/input/KeyboardSettings.h (revision 85e84ddefb2aa36c93ee3a0c5545ba053f2d56bd)
18272123eSPreetpal Kaur /*
28272123eSPreetpal Kaur  * Copyright 2004-2006, the Haiku project. All rights reserved.
347a21c5cSAugustin Cavalier  * Distributed under the terms of the MIT License.
48272123eSPreetpal Kaur  *
58272123eSPreetpal Kaur  * Authors in chronological order:
68272123eSPreetpal Kaur  *  mccall@digitalparadise.co.uk
78272123eSPreetpal Kaur  *  Jérôme Duval
88272123eSPreetpal Kaur  *  Marcus Overhagen
98272123eSPreetpal Kaur  */
108272123eSPreetpal Kaur 
118272123eSPreetpal Kaur 
128272123eSPreetpal Kaur #ifndef KEYBOARD_SETTINGS_H_
138272123eSPreetpal Kaur #define KEYBOARD_SETTINGS_H_
148272123eSPreetpal Kaur 
158272123eSPreetpal Kaur #include <SupportDefs.h>
160a6ab6bbSAdrien Destugues 
178272123eSPreetpal Kaur #include "kb_mouse_settings.h"
188272123eSPreetpal Kaur 
198272123eSPreetpal Kaur class KeyboardSettings {
208272123eSPreetpal Kaur public :
218272123eSPreetpal Kaur 	KeyboardSettings();
228272123eSPreetpal Kaur 	~KeyboardSettings();
238272123eSPreetpal Kaur 
248272123eSPreetpal Kaur 	void Revert();
258272123eSPreetpal Kaur 	void Defaults();
26*85e84ddeSMáximo Castañeda 	bool IsDefaultable() const;
278272123eSPreetpal Kaur 
KeyboardRepeatRate()288272123eSPreetpal Kaur 	int32 KeyboardRepeatRate() const
298272123eSPreetpal Kaur 		{ return fSettings.key_repeat_rate; }
308272123eSPreetpal Kaur 	void SetKeyboardRepeatRate(int32 rate);
318272123eSPreetpal Kaur 
KeyboardRepeatDelay()328272123eSPreetpal Kaur 	bigtime_t KeyboardRepeatDelay() const
338272123eSPreetpal Kaur 		{ return fSettings.key_repeat_delay; }
348272123eSPreetpal Kaur 	void SetKeyboardRepeatDelay(bigtime_t delay);
358272123eSPreetpal Kaur 
368272123eSPreetpal Kaur private:
378272123eSPreetpal Kaur 	kb_settings			fSettings;
388272123eSPreetpal Kaur 	kb_settings			fOriginalSettings;
398272123eSPreetpal Kaur };
408272123eSPreetpal Kaur 
418272123eSPreetpal Kaur #endif
42