Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
Loading...
Searching...
No Matches
InputEventKey Class Reference

#include <input.hpp>

Inheritance diagram for InputEventKey:
InputEventWithModifiers InputEvent

Public Member Functions

bool operator== (const InputEvent &other) const
 
bool operator<= (const InputEvent &other) const
 
bool isPressed () const
 
bool isReleased () const
 
float getStrength () const
 
- Public Member Functions inherited from InputEventWithModifiers
std::vector< bool > getModifiersMask () const
 
bool isCommandOrControlPressed () const
 
- Public Member Functions inherited from InputEvent
virtual ~InputEvent ()=default
 
bool isActionPressed (const std::string &action) const
 
bool isActionReleased (const std::string &action) const
 
bool isAction (const std::string &action) const
 

Public Attributes

bool echo = false
 
Keycode scancode = Keycode::UNKNOWN
 
Keycode keycode = Keycode::UNKNOWN
 
const char * keyLabel
 
bool pressed = false
 
- Public Attributes inherited from InputEventWithModifiers
bool altPressed = false
 
bool commandOrControlAutoremap = false
 
bool ctrlPressed = false
 
bool metaPressed = false
 
bool shiftPressed = false
 

Member Function Documentation

◆ getStrength()

float InputEventKey::getStrength ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ isPressed()

bool InputEventKey::isPressed ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ isReleased()

bool InputEventKey::isReleased ( ) const
inlinevirtual

Reimplemented from InputEvent.

◆ operator<=()

bool InputEventKey::operator<= ( const InputEvent other) const
virtual

Reimplemented from InputEvent.

◆ operator==()

bool InputEventKey::operator== ( const InputEvent other) const
virtual

Reimplemented from InputEvent.

Member Data Documentation

◆ echo

bool InputEventKey::echo = false

◆ keycode

Keycode InputEventKey::keycode = Keycode::UNKNOWN

◆ keyLabel

const char* InputEventKey::keyLabel

◆ pressed

bool InputEventKey::pressed = false

◆ scancode

Keycode InputEventKey::scancode = Keycode::UNKNOWN

The documentation for this class was generated from the following files: