SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Events::Input::KeyPressedEvent Class Reference

#include <KeyboardEvent.hpp>

Inheritance diagram for Sleak::Events::Input::KeyPressedEvent:

Public Member Functions

 KeyPressedEvent (const KeyCode keycode, bool isRepeat=false)
virtual EventType GetEventType () const override
virtual const char * GetName () const override
bool IsRepeat () const
std::string ToString () const override
Public Member Functions inherited from Sleak::Events::Input::KeyEvent
virtual int GetCategoryFlags () const override
KeyCode GetKeyCode () const
std::string GetKeyStr () const
Public Member Functions inherited from Sleak::Event
 Event ()
virtual ~Event ()=default
bool IsInCategory (EventCategory category)

Static Public Member Functions

static EventType GetStaticType ()

Additional Inherited Members

Public Attributes inherited from Sleak::Event
bool Handled = false
Protected Member Functions inherited from Sleak::Events::Input::KeyEvent
 KeyEvent (const KeyCode keycode)
Protected Attributes inherited from Sleak::Events::Input::KeyEvent
KeyCode m_KeyCode

Detailed Description

Fired on key-down; IsRepeat() distinguishes the initial press from OS auto-repeat.

Definition at line 32 of file KeyboardEvent.hpp.

Constructor & Destructor Documentation

◆ KeyPressedEvent()

Sleak::Events::Input::KeyPressedEvent::KeyPressedEvent ( const KeyCode keycode,
bool isRepeat = false )
inline

Definition at line 35 of file KeyboardEvent.hpp.

Member Function Documentation

◆ GetEventType()

virtual EventType Sleak::Events::Input::KeyPressedEvent::GetEventType ( ) const
inlineoverridevirtual

Implements Sleak::Event.

Definition at line 48 of file KeyboardEvent.hpp.

◆ GetName()

virtual const char * Sleak::Events::Input::KeyPressedEvent::GetName ( ) const
inlineoverridevirtual

Implements Sleak::Event.

Definition at line 48 of file KeyboardEvent.hpp.

◆ GetStaticType()

EventType Sleak::Events::Input::KeyPressedEvent::GetStaticType ( )
inlinestatic

Definition at line 48 of file KeyboardEvent.hpp.

◆ IsRepeat()

bool Sleak::Events::Input::KeyPressedEvent::IsRepeat ( ) const
inline

Definition at line 38 of file KeyboardEvent.hpp.

◆ ToString()

std::string Sleak::Events::Input::KeyPressedEvent::ToString ( ) const
inlineoverridevirtual

Reimplemented from Sleak::Event.

Definition at line 40 of file KeyboardEvent.hpp.