Small UNICODE key-stroke question

My project (Tux Typing) has recently had an influx of people interested in
having it support their native language. So I am starting to look into adding
UNICODE support… but I don’t really understand how SDL handles this.

Many keyboards take mutliple keystrokes to make a single character (eg.
Japanese, Dansk, etc.). Would those multiple keystrokes be invisible to the
app using SDL? (I.e., if you are expecting ONE key event for ONE character, is
that what you would get, or would you get a key event for each keystroke, and
then have to perform some sort of UNICODE lookup to pick out what those
keystrokes comprised?)

(In Tux Typing, we have pretty much assumed there would be a 1-to-1 mapping
from key event to character… so I need to know if we need to totally rewrite
everything to support UNICODE ;-)–
Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Advogato: < http://advogato.org/person/criswell/ >

Many keyboards take mutliple keystrokes to make a single character (eg.
Japanese, Dansk, etc.). Would those multiple keystrokes be invisible to the
app using SDL?

No you will get keyboard events for each physical key press/release,
but only get a unicode translation for the last keydown event (the one
that actually generates a character). Events that do not generate a
character have the unicode member set to zero.

SDL does not yet support multiple characters generated by a single
keypress; this will probably be solved by using portmanteau keypress
events (with fictional keysyms). Also the support for advanced input
methods (i.e. Japanese) is not there yet

SDL does not yet support multiple characters generated by a single
keypress; this will probably be solved by using portmanteau keypress
events (with fictional keysyms). Also the support for advanced input
methods (i.e. Japanese) is not there yet

However, the only reason it isn’t there yet is because nobody has asked
for it and been willing and able to test it. The event handling would
have to be moved over to the X11 Input Manager, which wouldn’t add any
overhead at least on XFree86, because the current Xlib input implementation
uses it already.

See ya,
-Sam Lantinga, Lead Programmer, Loki Software, Inc.

I’ll eventually like it (we have two people wanting to add Japanese support to
Tux Typing), but for now I doubt we’d have anyone to test it.

If we ever do get anyone to test it, who should I contact?On Fri, 06 Jul 2001, you wrote:

SDL does not yet support multiple characters generated by a single
keypress; this will probably be solved by using portmanteau keypress
events (with fictional keysyms). Also the support for advanced input
methods (i.e. Japanese) is not there yet

However, the only reason it isn’t there yet is because nobody has asked
for it and been willing and able to test it. The event handling would
have to be moved over to the X11 Input Manager, which wouldn’t add any
overhead at least on XFree86, because the current Xlib input implementation
uses it already.


Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Advogato: < http://advogato.org/person/criswell/ >

I’ll eventually like it (we have two people wanting to add Japanese support to
Tux Typing), but for now I doubt we’d have anyone to test it.

Hi, I’m working on getting Kanji input/Japanese locales working on my
Linux (I need it for school), so once I do (I guess i’ll just notify the
list?), I’d be happy to test it

Cameron Matheson_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com