Go to the source code of this file.
|
| int | gm_key_pressed (char t, char k) |
| | Checks if a key is currently pressed.
|
| char | gm_lower_case (char k) |
| | Converts a character to lowercase if it's an uppercase letter.
|
| char | gm_upper_case (char k) |
| | Converts a character to uppercase if it's a lowercase letter.
|
| void | gm_decode_key_shortcut (char key, char *t, char *k) |
| | Decodes a key shortcut into a type and key character.
|
| char | gm_encode_key_shortcut (char t, char k) |
| | Encodes a type and key character into a shortcut key.
|
| int | gm_key (char key) |
| | Checks if a key is currently pressed using a shortcut key.
|
◆ gm_decode_key_shortcut()
| void gm_decode_key_shortcut |
( |
char | key, |
|
|
char * | t, |
|
|
char * | k ) |
Decodes a key shortcut into a type and key character.
- Parameters
-
| key | The shortcut key to decode. |
| t | Pointer to store the decoded key type. |
| k | Pointer to store the decoded key character. |
◆ gm_encode_key_shortcut()
| char gm_encode_key_shortcut |
( |
char | t, |
|
|
char | k ) |
Encodes a type and key character into a shortcut key.
- Parameters
-
| t | The key type ('a' for arrow keys, 'm' for mouse events, 's' for special keys, 'c' for character keys). |
| k | The key character. |
- Returns
- The encoded shortcut key.
◆ gm_key()
Checks if a key is currently pressed using a shortcut key.
- Parameters
-
| key | The shortcut key to check. |
- Returns
- 1 if the key is pressed, 0 otherwise.
◆ gm_key_pressed()
| int gm_key_pressed |
( |
char | t, |
|
|
char | k ) |
Checks if a key is currently pressed.
- Parameters
-
| t | The type of key event ('a' for arrow keys, 'm' for mouse events, 's' for special keys, 'c' for character keys). |
| k | The specific key character or identifier. |
- Returns
- 1 if the key is pressed, 0 otherwise.
◆ gm_lower_case()
| char gm_lower_case |
( |
char | k | ) |
|
Converts a character to lowercase if it's an uppercase letter.
- Parameters
-
| k | The character to convert. |
- Returns
- The lowercase version of the character, or the original if not uppercase.
◆ gm_upper_case()
| char gm_upper_case |
( |
char | k | ) |
|
Converts a character to uppercase if it's a lowercase letter.
- Parameters
-
| k | The character to convert. |
- Returns
- The uppercase version of the character, or the original if not lowercase.