Wednesday, 15 September 2021

Mac eclipse problem


Mac eclipse problem:An internal error occurred during: "Task List Indexer."

http://www.noobyard.com/article/p-eiwsouzy-pm.html


Making the Home and End Keys work in Eclipse 3.4 on Apple Mac OSX

http://www.rojotek.com/blog/2009/06/12/making-the-home-and-end-keys-work-in-eclipse-34-on-apple-mac-osx/

Monday, 13 September 2021

Simulate the pressing of the "Command" key on a Mac

Simulate the pressing of the "Command" key on a Mac

n the Robot class, the name for Command(⌘) is KeyEvent.VK_META. Your code should look like this:

Robot r = new Robot();
r.keyPress(KeyEvent.VK_META); //press command
r.keyPress(KeyEvent.VK_L); //press l
r.keyRelease(KeyEvent.VK_META); //release command
r.keyRelease(KeyEvent.VK_L); //release l

This presses the Command key, presses the L key, then releases them both. I have tested this, and it works as it should.

NOTE: Using Robot throws AWTException, so it requires you to either surround with try-catch block, or throw AWTException in your method header