29#include "utility/event/event.hpp"
31namespace utility::event
530 std::shared_ptr<Event>
create(
void)
const override;
537 std::shared_ptr<KeyboardEvent>
createTyped(
void)
const;
546 bool isDownEvent {
true };
547 bool isRepeatEvent {
false };
Abstract factory interface for creating events.
Base class for events in the event system.
Factory for creating KeyboardEvent instances.
std::shared_ptr< KeyboardEvent > createTyped(void) const
Create a strongly-typed KeyboardEvent.
std::shared_ptr< Event > create(void) const override
Create a KeyboardEvent as a base Event pointer.
Keyboard event representation.
bool isModifierSet(const KeyModifiers modifier) const noexcept
Check if a specific key modifier is set.
KeyboardEvent & setIsRepeatEvent(const bool isRepeat) noexcept
Set whether the event is a key repeat event.
KeyboardEvent & setModifiers(const KeyModifiers modifiers) noexcept
Set the key modifiers.
@ KeyPadDoubleVerticalBar
KeyboardEvent & setScancode(const ScanCode scancode) noexcept
Set the keyboard scancode.
bool getIsDownEvent(void) const noexcept
Check if the event is a key down event.
KeyboardEvent(void)
Default constructor.
bool getIsRepeatEvent(void) const noexcept
Check if the event is a key repeat event.
KeyCode
Virtual key codes derived from keyboard scancodes.
KeyboardEvent & setIsDownEvent(const bool isDown) noexcept
Set whether the event is a key down event.
ScanCode getScancode(void) const noexcept
Get the keyboard scancode.
KeyModifiers
Key modifier flags.
KeyboardEvent & setKeycode(const KeyCode keycode) noexcept
Set the virtual key code.
~KeyboardEvent(void) override
Default destructor.
KeyCode getKeycode(void) const noexcept
Get the virtual key code.