[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keys in SDL



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.

-bill!