SDL_GetKeyFromScancode
Get the key code corresponding to the given scancode according to the current keyboard layout.
- Provided by: libsdl3-doc (Version: 3.2.20+ds-2)
- Source: libsdl3
- Report a bug
Get the key code corresponding to the given scancode according to the current keyboard layout.
#include <SDL3/SDL_keyboard.h>
SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, bool key_event);
If you want to get the keycode as it would be delivered in key events, including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should pass key_event as true. Otherwise this function simply translates the scancode based on the given modifier state.
Returns the SDL_Keycode that corresponds to the given SDL_Scancode.
This function is not thread safe.
This function is available since SDL 3.2.0.