class
#include <Magnum/Platform/GlfwApplication.h>
KeyEvent Key event.
Base classes
- class InputEvent
- Base for input events.
Public types
-
using Key = GlfwApplication::
Key deprecated in Git master - Key.
Public static functions
-
static auto keyName(GlfwApplication::
Key key) -> Containers:: StringView deprecated in Git master - Name for given key.
Public functions
-
auto key() const -> GlfwApplication::
Key - Key.
- auto scanCode() const -> UnsignedInt new in Git master
- Scancode.
-
auto keyName() const -> Containers::
StringView - Key name.
-
auto modifiers() const -> GlfwApplication::
Modifiers - Keyboard modifiers.
- auto isRepeated() const -> bool
- Whether the key press is repeated.
Typedef documentation
typedef GlfwApplication:: Key Magnum:: Platform:: GlfwApplication:: KeyEvent:: Key
Key.
Function documentation
static Containers:: StringView Magnum:: Platform:: GlfwApplication:: KeyEvent:: keyName(GlfwApplication:: Key key)
Name for given key.
GlfwApplication:: Key Magnum:: Platform:: GlfwApplication:: KeyEvent:: key() const
Key.
Layout-dependent name of given key. Use scanCode() to get a platform-specific but layout-independent identifier of given key.
UnsignedInt Magnum:: Platform:: GlfwApplication:: KeyEvent:: scanCode() const new in Git master
Scancode.
Platform-specific but layout-independent identifier of given key. Use key() to get a key name in the currently used layout.
Containers:: StringView Magnum:: Platform:: GlfwApplication:: KeyEvent:: keyName() const
Key name.
Human-readable localized UTF-8 name for the key returned by key() and scanCode(), intended for displaying to the user in e.g. key binding configuration. If there is no name for that key, an empty string is returned. If non-empty, the returned view is always Containers::
bool Magnum:: Platform:: GlfwApplication:: KeyEvent:: isRepeated() const
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.