How to Detect CAPS LOCK Press in Processing?

edited June 2015 in How To...

How to Detect CAPS LOCK Press in Processing? keyCode doesn't seem to be able to check this.

Answers

  • Answer ✓

    If you're in Java mode, you can use Java code in your Processing sketch. Googling "java detect caps lock" returns a ton of results.

    You might use the getLockingKeyState() function:

    boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);

Sign In or Register to comment.