This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

Draft

THIS PAGE IS A WORK IN PROGRESS ... Please make edits to this page to improve it!

SDL_GetScancodeName

Get a human-readable name for a scancode.

Syntax

const char* SDL_GetScancodeName(SDL_Scancode scancode);

Function Parameters

scancode

the desired SDL_Scancode to query

Return Value

Returns a pointer to the name for the scancode. If the scancode doesn't have a name this function returns an empty string ("").

Remarks

See SDL_Scancode for details.

Warning: The returned name is by design not stable across platforms, e.g. the name for SDL_SCANCODE_LGUI is "Left GUI" under Linux but "Left Windows" under Microsoft Windows, and some scancodes like SDL_SCANCODE_NONUSBACKSLASH don't have any name at all. There are even scancodes that share names, e.g. SDL_SCANCODE_RETURN and SDL_SCANCODE_RETURN2 (both called "Return"). This function is therefore unsuitable for creating a stable cross-platform two-way mapping between strings and scancodes.

Version

This function is available since SDL 2.0.0.

SDL_GetScancodeFromKey
SDL_GetScancodeFromName

CategoryAPI, CategoryKeyboard, CategoryDraft


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.