Robot and AWT on Linux

P

Paul Geisler

Hello,


when I issue a key typing sequence like

KeyEvent.VK_T, KeyEvent.VK_E, KeyEvent.VK_S, KeyEvent.VK_T,
KeyEvent.VK_ENTER

with Robot.keyPress / Robot.keyRelease(keycode) to a focussed AWT
TextField, i allways get "test " in the field on linux. The VK_ENTER
does not invoke the fields' action but instead is inserted as
whitespace. However, all other (non-java!) applications receive the
VK_ENTER properly, and insert an newline for example.

Any idea / workaround on this?


many thanks in advance,

Paul
 
J

John B. Matthews

Paul Geisler said:
when I issue a key typing sequence like

KeyEvent.VK_T, KeyEvent.VK_E, KeyEvent.VK_S, KeyEvent.VK_T,
KeyEvent.VK_ENTER

with Robot.keyPress / Robot.keyRelease(keycode) to a focussed AWT
TextField, i allways get "test " in the field on linux. The VK_ENTER
does not invoke the fields' action but instead is inserted as
whitespace. However, all other (non-java!) applications receive the
VK_ENTER properly, and insert an newline for example.

Any idea / workaround on this?

Would it help to indicate which versions of Java & Linux you're using?
Have you modified your X window manager policy settings? I don't recall
the details, but I remember getting some rather counter-intuitive
results concerning which window received which events.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top