ChaiLove API
0.28.0
|
Provides an interface to the user's keyboard. More...
Public Member Functions | |
bool | isDown (const std::string &key) |
Checks whether a certain key is down. More... | |
bool | isDown (int scancode) |
Checks whether a certain key is down. More... | |
bool | isScancodeDown (int scancode) |
Checks whether a certain key is down. More... | |
int | getScancodeFromKey (const std::string &key) |
Retrieve a scancode from the given key. More... | |
std::string | getKeyFromScancode (int scancode) |
Retrieve a key from the given scancode. More... | |
Provides an interface to the user's keyboard.
std::string love::keyboard::getKeyFromScancode | ( | int | scancode | ) |
Retrieve a key from the given scancode.
int love::keyboard::getScancodeFromKey | ( | const std::string & | key | ) |
Retrieve a scancode from the given key.
bool love::keyboard::isDown | ( | const std::string & | key | ) |
Checks whether a certain key is down.
key | The key to check. |
bool love::keyboard::isDown | ( | int | scancode | ) |
Checks whether a certain key is down.
scancode | The key scancode to check. |
bool love::keyboard::isScancodeDown | ( | int | scancode | ) |
Checks whether a certain key is down.
scancode | The key scancode to check. |