148 template<
typename ENUM>
151 std::map<ENUM, bool> actionPressed;
152 for (
auto &[action, key] : map)
154 return actionPressed;
164 template<
typename ENUM>
167 std::map<ENUM, bool> actionPressed;
168 for (
auto &[action, key] : map)
169 actionPressed.emplace(action, hasbeenReleased(key));
170 return actionPressed;
~Keyboard()
Destroy the Keyboard object.
Definition: Keyboard.cpp:14
int getKey() const
Get the Key value.
Definition: Keyboard.cpp:18
std::map< ENUM, bool > getKeysHasBeenPressed(std::map< ENUM, int > map) const
Get the Keys Has Been Pressed object.
Definition: Keyboard.hpp:165
bool hasBeenPressed(int key) const
Check if a key has been pressed.
Definition: Keyboard.cpp:23
int getKeyEnterCharCode() const
Get the Key Enter Char Code object.
Definition: Keyboard.cpp:83
int getKeyDCharCode() const
Get the Key D Char Code object.
Definition: Keyboard.cpp:92
int getKeyLeftCharCode() const
Get the Key Left Key Code object.
Definition: Keyboard.cpp:73
std::map< ENUM, bool > getKeysPressed(std::map< ENUM, int > map) const
Get the Keys Pressed object.
Definition: Keyboard.hpp:149
int getKeyRightCharCode() const
Get the Key Down Char Code object.
Definition: Keyboard.cpp:68
int getKeySCharCode() const
Get the Key S Char Code object.
Definition: Keyboard.cpp:88
Keyboard()
Construct a new Keyboard object.
Definition: Keyboard.cpp:10
bool isNotBeingPressed(int key) const
Check if a key is not being pressed.
Definition: Keyboard.cpp:38
bool isBeingPressed(int key) const
Check if a key is being pressed.
Definition: Keyboard.cpp:28
int getPressedKeycode() const
Get the Pressed Keycode object.
Definition: Keyboard.cpp:48
bool hasBeenReleased(int key) const
Check if a key has been released.
Definition: Keyboard.cpp:33
int getKeyDownCharCode() const
Get the Key Down Key Code object.
Definition: Keyboard.cpp:63
Keyboard class that handles inputs from computer keyboards.
Definition: Keyboard.hpp:20
void setExitKey(int key)
Set the Exit Key object.
Definition: Keyboard.cpp:43
int getKeySpaceCharCode() const
Get the Key Space Char Code object.
Definition: Keyboard.cpp:78
int getPressedCharcode() const
Get the Pressed Charcode object.
Definition: Keyboard.cpp:53
int getKeyUpCharCode() const
Get the Key Up Char Code object.
Definition: Keyboard.cpp:58