Helper class for Input-related functions: keyboard.
More...
#include <KeyboardHelper.hpp>
|
| static bool | isKeyPressed (const KeyboardKey &key) |
| | Check if a key has been pressed once. More...
|
| |
| static bool | isKeyDown (const KeyboardKey &key) |
| | Check if a key is being pressed. More...
|
| |
| static bool | isKeyReleased (const KeyboardKey &key) |
| | Check if a key has been released once. More...
|
| |
| static bool | isKeyUp (const KeyboardKey &key) |
| | Check if a key is NOT being pressed. More...
|
| |
| static void | setExitKey (const KeyboardKey &key) |
| | Set a custom key to exit program (default is ESC) More...
|
| |
| static int | getKeyPressed () |
| | Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty. More...
|
| |
| static int | getCharPressed () |
| | Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty. More...
|
| |
| static std::vector< KeyboardKey > | getPressedKeys () |
| | Get all the queued pressed keys. More...
|
| |
| static std::vector< int > | getPressedChars () |
| | Get all the queued keys char (unicode) More...
|
| |
| static std::string | getKeyName (const int &key, const int &scancode) |
| | Get key name. More...
|
| |
Helper class for Input-related functions: keyboard.
◆ getCharPressed()
| int raylib::helper::input::KeyboardHelper::getCharPressed |
( |
| ) |
|
|
static |
Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty.
- Returns
- the char pressed
◆ getKeyName()
| std::string raylib::helper::input::KeyboardHelper::getKeyName |
( |
const int & |
key, |
|
|
const int & |
scancode |
|
) |
| |
|
static |
Get key name.
- Parameters
-
| key | the key to get the name |
| scancode | the scancode to get the name |
- Returns
- the key name
◆ getKeyPressed()
| int raylib::helper::input::KeyboardHelper::getKeyPressed |
( |
| ) |
|
|
static |
Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty.
- Returns
- the key pressed
◆ getPressedChars()
| std::vector< int > raylib::helper::input::KeyboardHelper::getPressedChars |
( |
| ) |
|
|
static |
Get all the queued keys char (unicode)
- Returns
- the keys char
◆ getPressedKeys()
| std::vector< KeyboardKey > raylib::helper::input::KeyboardHelper::getPressedKeys |
( |
| ) |
|
|
static |
Get all the queued pressed keys.
- Returns
- the keys pressed
◆ isKeyDown()
| bool raylib::helper::input::KeyboardHelper::isKeyDown |
( |
const KeyboardKey & |
key | ) |
|
|
static |
Check if a key is being pressed.
- Parameters
-
- Returns
- true if the key is being pressed
◆ isKeyPressed()
| bool raylib::helper::input::KeyboardHelper::isKeyPressed |
( |
const KeyboardKey & |
key | ) |
|
|
static |
Check if a key has been pressed once.
- Parameters
-
- Returns
- true if the key is pressed
◆ isKeyReleased()
| bool raylib::helper::input::KeyboardHelper::isKeyReleased |
( |
const KeyboardKey & |
key | ) |
|
|
static |
Check if a key has been released once.
- Parameters
-
- Returns
- true if the key is released
◆ isKeyUp()
| bool raylib::helper::input::KeyboardHelper::isKeyUp |
( |
const KeyboardKey & |
key | ) |
|
|
static |
Check if a key is NOT being pressed.
- Parameters
-
- Returns
- true if the key is NOT being pressed
◆ setExitKey()
| void raylib::helper::input::KeyboardHelper::setExitKey |
( |
const KeyboardKey & |
key | ) |
|
|
static |
Set a custom key to exit program (default is ESC)
- Parameters
-
The documentation for this class was generated from the following files: