class
#include <Magnum/Platform/Sdl2Application.h>
KeyEvent Key event.
Base classes
- class InputEvent
- Base for input events.
Public types
-
using Key = Sdl2Application::
Key deprecated in Git master - Key.
Public static functions
-
static auto keyName(Sdl2Application::
Key key) -> Containers:: StringView deprecated in Git master - Name for given key.
Public functions
-
auto key() const -> Sdl2Application::
Key - Key.
- auto scanCode() const -> UnsignedInt new in Git master
- Scancode.
-
auto keyName() const -> Containers::
StringView - Key name.
-
auto scanCodeName() const -> Containers::
StringView new in Git master - Scan code name.
-
auto modifiers() const -> Sdl2Application::
Modifiers - Keyboard modifiers.
- auto isRepeated() const -> bool
- Whether the key press is repeated.
Typedef documentation
typedef Sdl2Application:: Key Magnum:: Platform:: Sdl2Application:: KeyEvent:: Key
Key.
Function documentation
static Containers:: StringView Magnum:: Platform:: Sdl2Application:: KeyEvent:: keyName(Sdl2Application:: Key key)
Name for given key.
Sdl2Application:: Key Magnum:: Platform:: Sdl2Application:: 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:: Sdl2Application:: 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:: Sdl2Application:: KeyEvent:: keyName() const
Key name.
Human-readable localized UTF-8 name for the key returned by key(), intended for displaying to the user in e.g. a key binding configuration. If there is no name for that key, an empty string is returned. The returned string is always Containers::SDL_GetKeyName()
API.
Containers:: StringView Magnum:: Platform:: Sdl2Application:: KeyEvent:: scanCodeName() const new in Git master
Scan code name.
Human-readable localized UTF-8 name for the scancode returned by scanCode(), intended for displaying to the user in e.g. a key binding configuration. If there is no name for that key, an empty string is returned. The returned string is always Containers::SDL_GetScancodeName()
API.
bool Magnum:: Platform:: Sdl2Application:: 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.