sdlGetScancodeFromKey function

int sdlGetScancodeFromKey(
  1. int key
)

Get the scancode corresponding to the given key code according to the current keyboard layout.

See SDL_Scancode for details.

\param key the desired SDL_Keycode to query \returns the SDL_Scancode that corresponds to the given SDL_Keycode.

\since This function is available since SDL 2.0.0.

\sa SDL_GetKeyFromScancode \sa SDL_GetScancodeName

extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key)

Implementation

int sdlGetScancodeFromKey(int key) {
  final sdlGetScancodeFromKeyLookupFunction =
      libSdl2.lookupFunction<Int32 Function(Int32 key), int Function(int key)>(
          'SDL_GetScancodeFromKey');
  return sdlGetScancodeFromKeyLookupFunction(key);
}