Sdlkey to ascii?

Hi there.

Is there a function that maps an SDL key event to ascii? (For the subset
of events where it makes sense, obviously).

I can write one myself, but since I am lazy, I would rather avoid to
duplicate the effort…

Thanks,

Mads–
Mads Bondo Dydensborg. @Mads_Bondo_Dydensbor
The infamous Melissa virus, Explore.zip, VBS/Bubbleboy, X97M/Papa, ILOVEYOU
and MORELOVE viruses all used the Outlook address book to spread themselves.

Hi there.

Is there a function that maps an SDL key event to ascii? (For the subset
of events where it makes sense, obviously).

RTFM - I figured it out. (And the crowd is amazed).

Weird, this unicode stuff.

MadsOn Sun, 16 Dec 2001, Mads Bondo Dydensborg wrote:


Mads Bondo Dydensborg. @Mads_Bondo_Dydensbor
Linux supports the notion of a command line or a shell for the same reason
that only children read books with only pictures in them. Language, be it
English or something else, is the only tool flexible enough to accomplish a
sufficiently broad range of tasks.
- Bill Garrett

Mads Bondo Dydensborg wrote:

Hi there.

Is there a function that maps an SDL key event to ascii? (For the subset
of events where it makes sense, obviously).

Try this:

SDL_EnableUNICODE(1);
ascii = event.key.keysym.unicode;

Bye,

Karl.