SDL_GetKeyFromScancode

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

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.

extern (C) nothrow @nogc extern
SDL_GetKeyFromScancode

Parameters

scancode SDL_Scancode

the desired SDL_Scancode to query.

modstate SDL_Keymod

the modifier state to use when translating the scancode to a keycode.

key_event bool

true if the keycode will be used in key events.

Return Value

The SDL_Keycode that corresponds to the given SDL_Scancode.

Threadsafety: This function is not thread safe.

See Also

Meta