Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::KeyPressedEvent Struct Reference

Event fired when a keyboard key is pressed. More...

#include <KeyEvent.h>

Inherits Raven::Event.

Public Member Functions

constexpr KeyPressedEvent (KeyCode key, bool repeat)
 Constructs a KeyPressedEvent.
Public Member Functions inherited from Raven::Event
constexpr bool IsInCategory (EventCategory cat) const noexcept
 Checks whether this event belongs to a given category.

Static Public Member Functions

static constexpr EventType StaticType ()
 Returns the static event type identifier.
static constexpr EventCategory StaticCategory ()

Public Attributes

KeyCode Key
 Key that was pressed.
bool Repeat
 True if this is a repeated key press (held down).
Public Attributes inherited from Raven::Event
EventType Type = EventType::None
 Concrete event type.
EventCategory Category = EventCategory::None
 Event category bitmask.

Detailed Description

Event fired when a keyboard key is pressed.

Contains the pressed key code and whether it was a repeated press.

Constructor & Destructor Documentation

◆ KeyPressedEvent()

Raven::KeyPressedEvent::KeyPressedEvent ( KeyCode key,
bool repeat )
inlineconstexpr

Constructs a KeyPressedEvent.

Parameters
keyThe key code of the pressed key.
repeatTrue if this is a repeat press (key held down).

Member Function Documentation

◆ StaticCategory()

constexpr EventCategory Raven::KeyPressedEvent::StaticCategory ( )
inlinestaticconstexpr

◆ StaticType()

constexpr EventType Raven::KeyPressedEvent::StaticType ( )
inlinestaticconstexpr

Returns the static event type identifier.

Member Data Documentation

◆ Key

KeyCode Raven::KeyPressedEvent::Key

Key that was pressed.

◆ Repeat

bool Raven::KeyPressedEvent::Repeat

True if this is a repeated key press (held down).


The documentation for this struct was generated from the following file: