Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Robot Keypress Command Key

Tags:

What is the VK_[key] code for the command key on a mac, if one exists? I am trying to get a Robot (java Robot) to press the command key. I am using the command keyPress(), and I need to know the integer keycode for the command key on a mac.

like image 591
Abaab Avatar asked Mar 14 '13 19:03

Abaab


1 Answers

KeyEvent.VK_META, with key code 157, is Java's virtual key that maps to the the Mac command key.

like image 142
FThompson Avatar answered Oct 20 '22 01:10

FThompson