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 #include "kb_mouse_settings.h" 17 18 class KeyboardSettings{ 19 public : 20 KeyboardSettings(); 21 ~KeyboardSettings(); 22 23 void Revert(); 24 void Defaults(); 25 bool IsDefaultable(); 26 27 int32 KeyboardRepeatRate() const 28 { return fSettings.key_repeat_rate; } 29 void SetKeyboardRepeatRate(int32 rate); 30 31 bigtime_t KeyboardRepeatDelay() const 32 { return fSettings.key_repeat_delay; } 33 void SetKeyboardRepeatDelay(bigtime_t delay); 34 35 private: 36 kb_settings fSettings; 37 kb_settings fOriginalSettings; 38 }; 39 40 #endif 41