PERRY v1.0.0
P-E-R-R-Y/PERRY helps creating games with a bunch of tools.
Loading...
Searching...
No Matches
SdlKeyboard Class Reference

Sdl Keyboard class. More...

#include <SdlKeyboard.hpp>

Inheritance diagram for SdlKeyboard:
graphic::IKeyboard

Public Member Functions

 SdlKeyboard (graphic::IEvent *event)
 Construct a new Sdl Keyboard object.
 
 ~SdlKeyboard ()
 Destroy the Sdl Keyboard object.
 
std::vector< KeyswhichKey () const override
 which key is set
 
bool isKeyPressed (Keys key) const override
 check if the key is pressed
 
bool isKeyDown (Keys key) const override
 check if the key is down
 
bool isKeyReleased (Keys key) const override
 check if the key is released
 
bool isKeyUp (Keys key) const override
 check if the key is up
 
void update () override
 update the keyboard
 
- Public Member Functions inherited from graphic::IKeyboard
virtual ~IKeyboard ()
 Destroy the IKeyboard object.
 

Private Attributes

SdlEvent_event
 
const std::unordered_map< IKeyboard::Keys, int > _keys
 

Additional Inherited Members

- Public Types inherited from graphic::IKeyboard
enum  Keys {
  KEY_UNKNOWN = -1 , KEY_ESCAPE , KEY_F1 , KEY_F2 ,
  KEY_F3 , KEY_F4 , KEY_F5 , KEY_F6 ,
  KEY_F7 , KEY_F8 , KEY_F9 , KEY_F10 ,
  KEY_F11 , KEY_F12 , KEY_1 , KEY_2 ,
  KEY_3 , KEY_4 , KEY_5 , KEY_6 ,
  KEY_7 , KEY_8 , KEY_9 , KEY_0 ,
  KEY_MINUS , KEY_EQUAL , KEY_BACKSPACE , KEY_TAB ,
  KEY_Q , KEY_W , KEY_E , KEY_R ,
  KEY_T , KEY_Y , KEY_U , KEY_I ,
  KEY_O , KEY_P , KEY_LEFT_BRACKET , KEY_RIGHT_BRACKET ,
  KEY_CAPS_LOCK , KEY_LEFT_CONTROL , KEY_A , KEY_S ,
  KEY_D , KEY_F , KEY_G , KEY_H ,
  KEY_J , KEY_K , KEY_L , KEY_SEMICOLON ,
  KEY_APOSTROPHE , BACK_TICK , KEY_ENTER , KEY_LEFT_SHIFT ,
  KEY_BACKSLASH , KEY_Z , KEY_X , KEY_C ,
  KEY_V , KEY_B , KEY_N , KEY_M ,
  KEY_COMMA , KEY_PERIOD , KEY_DOT , KEY_SLASH ,
  KEY_RIGHT_SHIFT , KEY_LEFT_ALT , KEY_SPACE , KEY_RIGHT_ALT ,
  KEY_RIGHT_CONTROL , KEY_PAD_0 , KEY_PAD_1 , KEY_PAD_2 ,
  KEY_PAD_3 , KEY_PAD_4 , KEY_PAD_5 , KEY_PAD_6 ,
  KEY_PAD_7 , KEY_PAD_8 , KEY_PAD_9 , KEY_PAD_MINUS ,
  KEY_PAD_PLUS , KEY_PAD_DOT , KEY_PAD_ENTER , KEY_UP ,
  KEY_DOWN , KEY_LEFT , KEY_RIGHT , KEY_LENGTH
}
 Scan codes. More...
 
- Static Public Attributes inherited from graphic::IKeyboard
static const int MAX_KEYS = 87
 

Detailed Description

Sdl Keyboard class.


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