multi-lingual keyboard input

S

Sam Denton

I'm adapting a Java-based typing tutor from QWERTY to (initially at
least) Cyrillic. My platform is Windows 2000 Professional. I've
installed Cyrillic keyboard support, and can use the Language Bar to
switch keyboard layouts at will. Using Notepad, I can enter Cyrillic
text into my Java program, and with a bit of work, it compiles and
runs. My GUI shows the proper characters when I paint the keyboard
layout, but keystrokes aren't being recognized.

If I click on the GUI, and then on the Windows Language Bar, I can
select the RU layout, but the language bar display doesn't change. I
have also tried opening a console and changing the input language. In
this case, the keyboard echos correctly to the console, but starting
my app from that command line doesn't seem to help. Do I need to set
the locale somehow? Is there anyway to "sense" the language bar
settings, and fix things up on the fly?

Thanks!
 
S

Sam Denton

I'm adapting a Java-based typing tutor from QWERTY to (initially at
least) Cyrillic. My platform is Windows 2000 Professional. I've
installed Cyrillic keyboard support, and can use the Language Bar to
switch keyboard layouts at will.

OK, I converted everything from the old-style inheritance model to the
new delegation-based model, and the new KeyEvents have the correct
keyChar. However, I still have to click inside my app's window, then
use the language bar to switch to the RU keyboad layout. I'd like to
either sense the current keyboard configuration or preferably change
it on the fly.

I suppose I could ask the user to type a key and use that to guess the
keyboard layout, but it seems a bit inelegant.

Google shows some old posts from people trying to write multilingual
text editors and the like. Did they all give up, or did someone solve
some of these problems already? I haven't been able to find any
evidence of the latter.

Again, thanks for any assistance.
 
A

ak

OK, I converted everything from the old-style inheritance model to the
new delegation-based model, and the new KeyEvents have the correct
keyChar. However, I still have to click inside my app's window, then
use the language bar to switch to the RU keyboad layout. I'd like to
either sense the current keyboard configuration or preferably change
it on the fly.

did you tryed to call setLocale(Locale l); ?

____________

http://reader.imagero.com the best java image reader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top