Expose the keymap separately from the event keycode

This adds functions to query the keymap:
* SDL_GetCurrentKeymap()
* SDL_GetKeymapKeycode()
* SDL_GetKeymapScancode()
* SDL_ReleaseKeymap()

and these are distinct from the function to query the event keycode associated with a scancode, which might be affected by SDL_HINT_KEYCODE_OPTIONS.

Also added an SDL_bool parameter to SDL_GetKeyName() and SDL_GetKeyFromName() to enable upper case handling of the name.
This commit is contained in:
Sam Lantinga 2024-08-05 16:37:24 -07:00
parent d68d32e12c
commit c298a3749b
15 changed files with 241 additions and 191 deletions

View file

@ -199,6 +199,7 @@ SDL3_0.0.0 {
SDL_GetCurrentCameraDriver;
SDL_GetCurrentDisplayMode;
SDL_GetCurrentDisplayOrientation;
SDL_GetCurrentKeymap;
SDL_GetCurrentRenderOutputSize;
SDL_GetCurrentThreadID;
SDL_GetCurrentTime;
@ -211,8 +212,6 @@ SDL3_0.0.0 {
SDL_GetDaysInMonth;
SDL_GetDefaultAssertionHandler;
SDL_GetDefaultCursor;
SDL_GetDefaultKeyFromScancode;
SDL_GetDefaultScancodeFromKey;
SDL_GetDesktopDisplayMode;
SDL_GetDirect3D9AdapterIndex;
SDL_GetDisplayBounds;
@ -329,6 +328,8 @@ SDL3_0.0.0 {
SDL_GetKeyboardNameForID;
SDL_GetKeyboardState;
SDL_GetKeyboards;
SDL_GetKeymapKeycode;
SDL_GetKeymapScancode;
SDL_GetLogOutputFunction;
SDL_GetLogPriority;
SDL_GetMasksForPixelFormat;
@ -413,7 +414,6 @@ SDL3_0.0.0 {
SDL_GetRendererProperties;
SDL_GetRevision;
SDL_GetSIMDAlignment;
SDL_GetScancodeFromKey;
SDL_GetScancodeFromName;
SDL_GetScancodeName;
SDL_GetSemaphoreValue;
@ -644,6 +644,7 @@ SDL3_0.0.0 {
SDL_RegisterApp;
SDL_RegisterEvents;
SDL_ReleaseCameraFrame;
SDL_ReleaseKeymap;
SDL_ReloadGamepadMappings;
SDL_RemovePath;
SDL_RemoveStoragePath;