Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

CAPS lock status in Linux

803718Oct 7 2010 — edited Oct 7 2010
Hi,
I'm trying to get the CAPS lock status in Java to display the same to the user in my application. I've used the code

Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK) .

This works properly in Windows but throws UnsupportedOperationException in Linux. Can you help me to get the CAPS lock state in Linux.

Regards
Ruban

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 4 2010
Added on Oct 7 2010
1 comment
1,595 views