The keycode in key events is affected by modifiers by default.

This behavior can be customized with SDL_HINT_KEYCODE_OPTIONS.
This commit is contained in:
Sam Lantinga committed 2024-06-22 00:19:06 -07:00
1 parent 1e81424b3d
commit 90034b16dc
6 files changed
+149 -29

No files matched your search

+1 -1
View File
@@ -234,7 +234,7 @@ static void loop(void)
SDL_Log("Cleared audio stream");
} else if (sym == SDLK_s) {
queue_audio();
} else if (sym == SDLK_d) {
} else if (sym == SDLK_d || sym == SDLK_D) {
float amount = 1.0f;
amount *= (e.key.mod & SDL_KMOD_CTRL) ? 10.0f : 1.0f;
amount *= (e.key.mod & SDL_KMOD_SHIFT) ? 10.0f : 1.0f;