Japanese input

Hello,

I use SDL for an application and I was wondering how I could implement
japanese input.

I need a cross platform solution for linux, macosx and windows.

Regards–
Kuon
CEO - Goyman.com SA
http://www.goyman.com/

“Computers should not stop working when the users’ brain does.”
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3271 bytes
Desc: S/MIME Cryptographic Signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061119/c81d14ce/attachment.bin

Hey,

I would look into SDL_EnableUNICODE(int enable);
With SDL_EnableUNICODE(true) and probably SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL), you can test your SDL_Event keypress (assuming you already know how that works) with something like (event.key.keysym.unicode > minJapCharValue && event.key.keysym.unicode < maxJapCharValue) and then take the value with char input = (char)event.key.keysym.unicode;
You’ll probably want to use SDL_EnableUNICODE(false) when you’re done getting keyboard input.

This is fully cross-platform, but your user of course needs to be using a Japanese keyboard layout. An example for the value min and max for english/roman characters is 0 - 0x80. Japanese characters are probably up there in the mid-range of the unicode set. Google for a unicode map/table.

Jonny D_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

Jonathan Dearborn wrote:

Hey,

I would look into SDL_EnableUNICODE(int enable);
With SDL_EnableUNICODE(true) and probably
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,
SDL_DEFAULT_REPEAT_INTERVAL), you can test your SDL_Event keypress
(assuming you already know how that works) with something
like (event.key.keysym.unicode > minJapCharValue &&
event.key.keysym.unicode < maxJapCharValue) and then take the value with
char input = (char)event.key.keysym.unicode;
You’ll probably want to use SDL_EnableUNICODE(false) when you’re done
getting keyboard input.

This is fully cross-platform, but your user of course needs to be using
a Japanese keyboard layout. An example for the value min and max for
english/roman characters is 0 - 0x80. Japanese characters are probably
up there in the mid-range of the unicode set. Google for a unicode
map/table.

Jonny D

Hello,

This is not what I want, I want a japanese input method where use type
into roman char and use the arrow keys or space bar or whatever to
choose the correct hiragana, katagana or kanji for the word.

Regards–
Kuon
CEO - Goyman.com SA
http://www.goyman.com/

“Computers should not stop working when the users’ brain does.”
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3271 bytes
Desc: S/MIME Cryptographic Signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061120/fd6fa8d1/attachment.bin

Hi,On Mon, 20 Nov 2006 10:32:17 +0100 kuon - Nicolas Goy - ??? wrote:

This is not what I want, I want a japanese input method where use type
into roman char and use the arrow keys or space bar or whatever to
choose the correct hiragana, katagana or kanji for the word.

How about SDL_inputmethod?

http://sdlinputmethod.sourceforge.net/index.php?l=en


Kent.N <@Kent.N>

Kent.N wrote:

Hi,

This is not what I want, I want a japanese input method where use type
into roman char and use the arrow keys or space bar or whatever to
choose the correct hiragana, katagana or kanji for the word.

How about SDL_inputmethod?

http://sdlinputmethod.sourceforge.net/index.php?l=en

The problem is that it does not support Macosx input methods and I
cannot use X on macosx.

I will see if I can contribute to this work to implement macosx support.

Thanks

Regards> On Mon, 20 Nov 2006 10:32:17 +0100 kuon - Nicolas Goy - ??? <@Nicolas_Goy> wrote:


Kuon
CEO - Goyman.com SA
http://www.goyman.com/

“Computers should not stop working when the users’ brain does.”
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3271 bytes
Desc: S/MIME Cryptographic Signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061120/94deb0dc/attachment.bin