15 #include <vsg/ui/ApplicationEvent.h>
16 #include <vsg/ui/KeyEvent.h>
32 vsg::time_point timeOfFirstKeyPress = {};
33 vsg::time_point timeOfLastKeyPress = {};
34 vsg::time_point timeOfKeyRelease = {};
38 std::map<KeySymbol, KeyHistory> keyState;
41 bool pressed(KeySymbol key,
bool ignore_handled_keys =
true)
const;
45 std::pair<double, double>
times(KeySymbol key,
bool ignore_handled_keys =
true)
const;
FocusInEvent represents a window acquiring focus event.
Definition: WindowEvent.h:98
FocusOutEvent represents a window losing focus event.
Definition: WindowEvent.h:109
KeyPressEvent represents a key press event.
Definition: KeyEvent.h:309
KeyReleaseEvent represents a key release event.
Definition: KeyEvent.h:320
Keyboard tracks keyboard events to enable the querying of the key pressed state and how long the key ...
Definition: Keyboard.h:23
std::pair< double, double > times(KeySymbol key, bool ignore_handled_keys=true) const
bool pressed(KeySymbol key, bool ignore_handled_keys=true) const
return true if key is currently pressed
Definition: Keyboard.h:31