|
|
|
|
@ -750,13 +750,22 @@ class GlfwApplication::KeyEvent: public GlfwApplication::InputEvent {
|
|
|
|
|
/** @brief Modifiers */ |
|
|
|
|
constexpr Modifiers modifiers() const { return _modifiers; } |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Whether the key press is repeated |
|
|
|
|
* |
|
|
|
|
* Returns `true` if the key press event is repeated, `false` if not or |
|
|
|
|
* if this was key release event. |
|
|
|
|
*/ |
|
|
|
|
constexpr bool isRepeated() const { return _repeated; } |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
static Modifiers getCurrentGlfwModifiers(GLFWwindow* window); |
|
|
|
|
|
|
|
|
|
constexpr KeyEvent(Key key, Modifiers modifiers): _key(key), _modifiers(modifiers) {} |
|
|
|
|
constexpr KeyEvent(Key key, Modifiers modifiers, bool repeated): _key{key}, _modifiers{modifiers}, _repeated{repeated} {} |
|
|
|
|
|
|
|
|
|
const Key _key; |
|
|
|
|
const Modifiers _modifiers; |
|
|
|
|
const bool _repeated; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|