• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Java Robot - how to press the keypad enter key

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I'm writing a Robot and wonder what is the command to press Enter (the key on the very right side, not the Enter above the shift).
The reason for this is because I have an application that the Enter (or Return) is only by the very right enter key.

Thanks!




image here

 
Sheriff
Posts: 22822
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Odd. There should be absolutely no difference between both enter keys. I don't think any program that doesn't hook directly into the keyboard drivers will notice a difference between the two.
 
Adrian Burlington
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The program that I'm using (the external one) the most right enter key is ENTER (or RETURN) and the one above the shift is NEW LINE.

 
Rob Spoor
Sheriff
Posts: 22822
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not for Java. Run the following program, and press all the keys you want to see how Java sees them:
A little testing shows that it does recognize the difference between the keys on the numeric keypad and the matching keys on the rest of the keyboard when numlock is active, it doesn't see a difference between:
- left and right shift
- left and right control
- left and right alt
- "regular" enter and keypad enter
- "regular" insert and keypad insert
- "regular" delete and keypad delete
- "regular" home and keypad home
- "regular" end and keypad end
- "regular" page up and keypad page up
- "regular" page down and keypad page down

If your other program does it recognize these differences it uses a lower-level technique of finding the differences.
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic