On 02/12/2010 06:39 AM, Paolo Bonzini wrote:
    /* 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.

So basically, Debian carries a hacked version of SDL that changes the key press behaviour?

That's a Debian/Ubuntu bug. Shame on them for changing the behaviour of a library API like that.

Regards,

Anthony Liguori

Paolo





Reply via email to