galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
KeyPressed.hpp
Go to the documentation of this file.
1
7
8
#ifndef GALAXY_EVENTS_KEYPRESSED_HPP_
9
#define GALAXY_EVENTS_KEYPRESSED_HPP_
10
11
#include "
galaxy/events/Event.hpp
"
12
#include "
galaxy/input/Keys.hpp
"
13
14
namespace
galaxy
15
{
19
struct
KeyPressed
final :
public
Event
20
{
30
KeyPressed
(
const
SDL_Scancode scancode,
const
Keys
key,
const
KeyMods
mod,
const
unsigned
short
raw,
const
bool
repeat)
noexcept
;
31
35
SDL_Scancode
m_scancode
= SDL_SCANCODE_UNKNOWN;
36
40
Keys
m_key
=
Keys::KEY_UNKNOWN
;
41
45
KeyMods
m_mod
=
KeyMods::MOD_NONE
;
46
50
unsigned
short
m_raw
= 0;
51
55
bool
m_repeat
=
false
;
56
};
57
}
// namespace galaxy
58
59
#endif
Event.hpp
Keys.hpp
galaxy::Event
Base type of all events.
Definition
Event.hpp:17
galaxy
Application.hpp galaxy.
Definition
Application.cpp:40
galaxy::Keys
Keys
Enum class representing keys.
Definition
Keys.hpp:23
galaxy::Keys::KEY_UNKNOWN
@ KEY_UNKNOWN
galaxy::KeyMods
KeyMods
Enum class for key modifiers.
Definition
Keys.hpp:286
galaxy::KeyMods::MOD_NONE
@ MOD_NONE
galaxy::KeyPressed
Contains data on key that was pressed.
Definition
KeyPressed.hpp:20
galaxy::KeyPressed::m_repeat
bool m_repeat
True if this is a key repeat.
Definition
KeyPressed.hpp:55
galaxy::KeyPressed::m_mod
KeyMods m_mod
Current key modifiers.
Definition
KeyPressed.hpp:45
galaxy::KeyPressed::m_raw
unsigned short m_raw
The platform dependent scancode for this event.
Definition
KeyPressed.hpp:50
galaxy::KeyPressed::m_scancode
SDL_Scancode m_scancode
SDL physical key code.
Definition
KeyPressed.hpp:35
galaxy::KeyPressed::KeyPressed
KeyPressed(const SDL_Scancode scancode, const Keys key, const KeyMods mod, const unsigned short raw, const bool repeat) noexcept
Constructor.
Definition
KeyPressed.cpp:12
galaxy::KeyPressed::m_key
Keys m_key
SDL virtual key code.
Definition
KeyPressed.hpp:40
galaxy
src
galaxy
events
KeyPressed.hpp
Generated on Sun Feb 1 2026 05:57:14 for galaxy by
1.12.0