Class KeyEvent#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class KeyEvent : public TRAP::Events::Event#

Key event base class.

Remark

Headless mode: This class is not available in headless mode.

Subclassed by TRAP::Events::KeyPressEvent, TRAP::Events::KeyReleaseEvent, TRAP::Events::KeyRepeatEvent

Public Functions

consteval KeyEvent(const KeyEvent&) noexcept = delete#

Copy constructor.

consteval KeyEvent &operator=(const KeyEvent&) noexcept = delete#

Copy assignment operator.

constexpr ~KeyEvent() override = default#

Destructor.

constexpr Input::Key GetKey() const noexcept#

Retrieve the affected key.

Returns:

Key.

virtual constexpr EventCategory GetCategoryFlags() const noexcept override#

Retrieve the category flags of the event.

Returns:

Combination of one or more EventCategory’s.

Protected Functions

explicit constexpr KeyEvent(Input::Key key) noexcept#

Constructor.

Parameters:

key – Affected key.

constexpr KeyEvent(KeyEvent&&) noexcept = default#

Move constructor.

constexpr KeyEvent &operator=(KeyEvent&&) noexcept = default#

Move assignment operator.