Robot and AWT on Linux

Discussion in 'Java' started by Paul Geisler, Jan 18, 2009.

  1. Paul Geisler

    Paul Geisler Guest

    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
    Paul Geisler, Jan 18, 2009
    #1
    1. Advertising

  2. In article <-berlin.de>,
    Paul Geisler <> wrote:

    > 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.

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Jan 19, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrel Riekhof

    How to stop a killer java.awt.robot?

    Darrel Riekhof, Sep 30, 2003, in forum: Java
    Replies:
    1
    Views:
    1,063
    Joe Smith
    Sep 30, 2003
  2. Robert Mark Bram
    Replies:
    2
    Views:
    5,938
    Robert Mark Bram
    Dec 11, 2003
  3. Rafal Majda
    Replies:
    2
    Views:
    918
    Thomas Weidenfeller
    Apr 12, 2005
  4. Rafal Majda
    Replies:
    5
    Views:
    2,230
    Rafal Majda
    Apr 18, 2005
  5. Christopher Koppler

    java.awt.Robot equivalent?

    Christopher Koppler, Dec 12, 2003, in forum: Python
    Replies:
    3
    Views:
    820
    Christopher Koppler
    Dec 12, 2003
Loading...

Share This Page