/* There are two versions around of a Debian patch that changes the
way Caps Lock and Num Lock are handled. The first version
by default sends only one of the KeyDown/KeyUp events, unless
SDL_DISABLE_LOCK_KEYS is present in the environment. The second
version instead by default sends both events, unless
SDL_DISABLE_LOCK_KEYS is present and not empty. This version
is the most commonly found (and a totally braindead idea).
Upstream instead supports SDL_NO_LOCK_KEYS which, if set to 1,
will generate all four events---which is what we want. Luckily,
there is a combination of environment variable that will satisfy
all variant. */
putenv ("SDL_DISABLE_LOCK_KEYS", "");
putenv ("SDL_NO_LOCK_KEYS", "1");
Yes, I love Debian.