diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-22 21:17:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-22 21:17:15 +0000 |
commit | 540b500f2176966ebfb7f21ebd2c17ddfdcd34e6 (patch) | |
tree | e31bbf0046237b5134002f51d48c1b3f5b752f4f /src/client/key.h | |
parent | 9adc3720cd8fe2ba843d014dbbfe81bf936f9715 (diff) |
keyboard key repeat
Diffstat (limited to 'src/client/key.h')
-rw-r--r-- | src/client/key.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/key.h b/src/client/key.h index 6f190c0..d1a8e96 100644 --- a/src/client/key.h +++ b/src/client/key.h @@ -40,8 +40,12 @@ public: /// return the bind for a specific modifier std::string const & bind(Modifier mod) const; + /// first time the key was pressed since previous release inline float & pressed() { return key_pressed; } + /// last time the key was pressed + inline float & lastpressed() { return key_lastpressed; } + inline std::string const & name() const { return key_name; } inline char ascii() const { return key_ascii; } @@ -54,6 +58,7 @@ private: char key_ascii; float key_pressed; + float key_lastpressed; std::string key_bind; std::string key_bind_shift; |