L
Linus Sylv?n
Hi I'm trying to make a "virtual keyboard" in java.
And the problem is that Java's Robot class two methods
void keyPress(int keycode)
void keyRelease(int keycode)
takes an int as argument and there doesn't seem to be codes for the
Swedish letters Å å, Ä ä, Ö ö
Are there codes for these letters? (Guess not I tried every code from
0 to 2024).
If not, is there any workaround or trick I could use?
I tried to generate KeyEvents with
Int id=401;
e = new KeyEvent(this, id, 0, 0, 0, 'ö');
kfm.dispatchKeyEvent(e);
but they don't leave the java application and that exactly what I want
them to do, write to Microsoft's word for example, the focusing
problem and the widows z-order problem are more or less solved via
native c programming and JNI wrapping.
So focus is set to the other receiving app at the time when the
keyevent dispatches: works with the Robot.
Do I have to generate these 3 keypress events with native programming
or is there a way to do this in Java??
Regards Linus Sylvén
And the problem is that Java's Robot class two methods
void keyPress(int keycode)
void keyRelease(int keycode)
takes an int as argument and there doesn't seem to be codes for the
Swedish letters Å å, Ä ä, Ö ö
Are there codes for these letters? (Guess not I tried every code from
0 to 2024).
If not, is there any workaround or trick I could use?
I tried to generate KeyEvents with
Int id=401;
e = new KeyEvent(this, id, 0, 0, 0, 'ö');
kfm.dispatchKeyEvent(e);
but they don't leave the java application and that exactly what I want
them to do, write to Microsoft's word for example, the focusing
problem and the widows z-order problem are more or less solved via
native c programming and JNI wrapping.
So focus is set to the other receiving app at the time when the
keyevent dispatches: works with the Robot.
Do I have to generate these 3 keypress events with native programming
or is there a way to do this in Java??
Regards Linus Sylvén