[SDL] Non US keyboards....

Mikael Aronsson mikael_aronsson at mail.bip.net
Wed Jun 27 00:37:08 PDT 2001


Hi !

Thanks, that did it, but as this is unicode stuff, does this work on
Windows95/98 to ? (I don't have one to try it on)

Mikael

----- Original Message -----
From: "Sam Lantinga" <slouken at devolution.com>
To: <sdl at lokigames.com>
Sent: Wednesday, June 27, 2001 12:44 AM
Subject: Re: [SDL] Non US keyboards....


> > I think I am doing something wrong then, when I press the "Å" (that's a
> > swedish character) I get 91 in the key event, which is a '[' character,
and
> > "[" is returned by SDL_GetKeyName() (this is all with SDL 1.2.1 on
> > Windows2000, I have not tried it on Linux yet).
>
> It's a common mistake and should go in the FAQ.
>
> You're expecting text input and what you're getting is raw keysyms.
> Enable UNICODE translation by using the following call:
> SDL_EnableUNICODE(1);
> Then look at the 'unicode' member of the SDL keyboard event.
>
> Note that a unicode value for a key up event is not defined.
>
> See ya!
> -Sam Lantinga, Lead Programmer, Loki Software, Inc.




More information about the SDL mailing list