views:

531

answers:

1

I am trying to pass keyboard input from Javascript into a Flex app being displayed with Internet Explorer with the input language set to Japanese (using Full Katakana) in the Windows XP language bar. After an initial keystroke, I am passing focus from Javascript to a text field in Flex. Once the focus is in Flex, the IME wakes up and input of the Japanese characters behaves normally. Unfortunately, the initial keystroke does not make it into the IME editor, and so I was hoping to pass along the unicode key value for the keystroke. The keyDown event in Javascript is reporting only 229 for the keyCode, and 0 for the charCode. Any ideas about getting a usable key or char code in Javascript while using Japanese input?

Thanks, Philip

A: 

Try using "keypress" instead of "keydown", keycode for down arrow should be 40.

Also you may try to find a bug — eating first char looks strange.