Commit 83bb1366197d21a2c6118199d8f6969bfdb0d479

Zack Middleton 2021-08-15T12:41:27

Restore KMOD_RESERVED for backward compatibility Some applications check for KMOD_RESERVED but it was replaced with KMOD_SCROLL in https://github.com/libsdl-org/SDL/commit/cb1e20b058f1de55b98f32b7d16cff1f896f88dd.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/include/SDL_keycode.h b/include/SDL_keycode.h
index f94fcec..14a24e3 100644
--- a/include/SDL_keycode.h
+++ b/include/SDL_keycode.h
@@ -343,7 +343,9 @@ typedef enum
     KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL,
     KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT,
     KMOD_ALT = KMOD_LALT | KMOD_RALT,
-    KMOD_GUI = KMOD_LGUI | KMOD_RGUI
+    KMOD_GUI = KMOD_LGUI | KMOD_RGUI,
+
+    KMOD_RESERVED = KMOD_SCROLL /* This is for source-level compatibility with SDL 2.0.0. */
 } SDL_Keymod;
 
 #endif /* SDL_keycode_h_ */