diff options
| author | jussi | 2023-11-23 00:00:49 +0200 |
|---|---|---|
| committer | jussi | 2023-11-23 00:00:49 +0200 |
| commit | 1ab9722875c543e8fd1b6600fd16e51412181641 (patch) | |
| tree | 412a3b0d139daa8832217e9e4240bd1cd299d4c5 /src/core.c | |
| parent | 85a48cf09302a2a14aeeb2d6cf3b8fcc1607e222 (diff) | |
| download | reilua-enhanced-1ab9722875c543e8fd1b6600fd16e51412181641.tar.gz reilua-enhanced-1ab9722875c543e8fd1b6600fd16e51412181641.tar.bz2 reilua-enhanced-1ab9722875c543e8fd1b6600fd16e51412181641.zip | |
Support for different platforms. Platform_desktop_sdl.
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 50 |
1 files changed, 0 insertions, 50 deletions
@@ -1888,56 +1888,6 @@ int lcoreSetExitKey( lua_State *L ) { } /* -> 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. - -- Success return string or nil -*/ -int lcoreGetKeyName( lua_State *L ) { - int key = luaL_checkinteger( L, 1 ); - int scancode = luaL_checkinteger( L, 2 ); - - const char *keyName = glfwGetKeyName( key, scancode ); - - if ( keyName != NULL ) { - lua_pushstring( L, keyName ); - } - else { - lua_pushnil( L ); - } - - return 1; -} - -/* -> 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. - -- Success return int -*/ -int lcoreGetKeyScancode( lua_State *L ) { - int key = luaL_checkinteger( L, 1 ); - - lua_pushinteger( L, glfwGetKeyScancode( key ) ); - - return 1; -} - -/* ## Core - Input-related functions: gamepads */ |
