Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/key.h')
-rw-r--r--src/client/key.h5
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;