detecting the enter key under Mac OS X

Discussion in 'Java' started by Graham Matthews, Jul 10, 2003.

  1. Hi

    We are using jdk 1.4 under Mac OS X. A team-member used the
    following code to detect an enter keypress.

    if (e.getKeyChar() == KeyEvent.VK_ENTER)
    {
    if (KeyEvent.KEY_LOCATION_NUMPAD == e.getKeyLocation())
    {
    // enter key detected
    }

    This works under Windoze but not Mac OS X. I am guessing this code
    is garbagio.

    Help!

    graham
    Graham Matthews, Jul 10, 2003
    #1
    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. BrianDH

    Enter Key H*ll, control enter key submit button

    BrianDH, Jan 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    363
    Anders Matthiessen
    Jan 12, 2005
  2. M P
    Replies:
    1
    Views:
    451
  3. Matt
    Replies:
    1
    Views:
    493
    Michael Winter
    Mar 6, 2004
  4. HopfZ
    Replies:
    0
    Views:
    534
    HopfZ
    Aug 28, 2006
  5. Replies:
    4
    Views:
    281
Loading...

Share This Page