sdlGetKeyFromScancode function

int sdlGetKeyFromScancode(
  1. int scancode
)

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

See SDL_Keycode for details.

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

\since This function is available since SDL 2.0.0.

\sa SDL_GetKeyName \sa SDL_GetScancodeFromKey

extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode)

Implementation

int sdlGetKeyFromScancode(int scancode) {
  final sdlGetKeyFromScancodeLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 scancode),
      int Function(int scancode)>('SDL_GetKeyFromScancode');
  return sdlGetKeyFromScancodeLookupFunction(scancode);
}