From aab80ddc8f56d6a383182ce5c241e9d94ca27bab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 May 2012 21:16:31 +0300 Subject: Add ability to auto repeat some keys presses. --- src/keyboardconfig.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/keyboardconfig.h') diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index 88d525522..4fc1bdc51 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -75,6 +75,8 @@ class KeyboardConfig KeysVector *getActionVector(const SDL_Event &event); + KeysVector *getActionVectorByKey(int i); + std::string getKeyName(int key); bool isActionActive(int index) const; @@ -87,6 +89,10 @@ class KeyboardConfig int getActionId(const SDL_Event &event); + void handleRepeat(int time); + + void resetRepeat(int key); + private: bool mEnabled; /**< Flag to respond to key input */ @@ -97,6 +103,8 @@ class KeyboardConfig KeyToActionMap mKeyToAction; KeyToIdMap mKeyToId; + + KeyTimeMap mKeyTimeMap; }; extern KeyboardConfig keyboard; -- cgit v1.2.3-60-g2f50