detecting the enter key under Mac OS X

G

Graham Matthews

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
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top