diff options
| author | jussi | 2023-03-30 00:13:02 +0300 |
|---|---|---|
| committer | jussi | 2023-03-30 00:13:02 +0300 |
| commit | 6a7c660f33e8ec4d351c63779df27874124597c6 (patch) | |
| tree | ae9c4e88093b1e89a9ca3d2ce71d996862247f72 /API.md | |
| parent | 9df23e32b02167dd41c8b5c25b852717163dfeda (diff) | |
| download | reilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.tar.gz reilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.tar.bz2 reilua-enhanced-6a7c660f33e8ec4d351c63779df27874124597c6.zip | |
GetKeyName and GetKeyScancode.
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -87,6 +87,8 @@ LOG_NONE ## Globals - KeyboardKey +GLFW_KEY_UNKNOWN + KEY_NULL KEY_APOSTROPHE @@ -1699,6 +1701,36 @@ Set a custom key to exit program ( default is ESC ) --- +> keyName = RL_GetKeyName( int key, int scancode ) + +This function returns the name of the specified printable key, encoded as UTF-8. +This is typically the character that key would produce without any modifier keys, +intended for displaying key bindings to the user. For dead keys, it is typically +the diacritic it would add to a character. + +Do not use this function for text input. You will break text input for many +languages even if it happens to work for yours. + +If the key is KEY_UNKNOWN, the scancode is used to identify the key, +otherwise the scancode is ignored. If you specify a non-printable key, +or KEY_UNKNOWN and a scancode that maps to a non-printable key, +this function returns nil but does not emit an error. + +- Failure return -1 +- Success return string or nil + +--- + +> scancode = RL_GetKeyScancode( int key ) + +This function returns the platform-specific scancode of the specified key. +If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1. + +- Failure return nil +- Success return int + +--- + ## Core - Input-related Gamepad --- |
