[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Keys in SDL
- To: linuxgames@sunsite.dk
- Subject: Re: Keys in SDL
- From: Gregor Mückl <GregorMueckl@gmx.de>
- Date: Tue, 21 Jan 2003 20:12:32 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: mailing list linuxgames@sunsite.dk
- Delivery-date: Tue, 21 Jan 2003 14:13:59 -0500
- In-reply-to: <20021125191244.GD27874@fysh.org>
- Mailing-list: contact linuxgames-help@sunsite.dk; run by ezmlm
- References: <20021125191244.GD27874@fysh.org> <3DE2B388.6080201@airmail.net> <20021129180109.GB26555@fysh.org> <3DEF8287.41A19@gbl.com.br> <20021205204605.GA31724@fysh.org> <3DEFD379.2060706@airmail.net> <20021206175839.GA1980@fysh.org> <3DF10011.2040403@airmail.net> <3DF1F162.34283119@gbl.com.br> <3E2C5B4C.548FFF79@gbl.com.br> <20030120155004.F7106@sonic.net> <3E2CC7A6.BA66E971@gbl.com.br>
- Reply-to: linuxgames@sunsite.dk
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021016
Miguel A. Osorio wrote:
Bill Kendrick wrote:
>On Mon, Jan 20, 2003 at 06:25:48PM -0200, Miguel A. Osorio wrote:
>
>>Hey people,
>>
>>
>>
>> It's been quite some time since someone last posted here :) So
here's
>>one simple problem I'm having. Using SDL, I coded some routines to get
>>input in the form of a string, but I'm having trouble with keys that
>>need a SHIFT to come out correctly - for instance, if I press a '4', ok,
>>but if I press SHIFT + '4', I still get the SDLK_4 symbol.
>
>Check the 'event.key.keysym.unicode' value when you get the
SDL_KEYDOWN event.
>
>That's what I do in Tux Paint to cobble together strings in the
'Text' tool.
Ok, but I do have to turn on unicode processing, right?
Right. Just do a "SDL_EnableUNICODE(1);" after SDL_SetVideoMode(...);
This way you might even get characters special to the currently set
Locale (like those "Umlaute" in german). Some of them are
two-byte-character, so be careful.
Gregor
Miguel A. Osorio.