Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8034850

Toolkit.setLockingKeyState(VK_CAPS_LOCK) does not work on Linux

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:

      Description

      Toolkit.setLockingKeyState throws UnsupportedOperationException on Linux and does not change CapsLock state.

      At the same time the CapsLock state can be changed by the AWT Robot.

      The attached program demonstrates the issue.

      akulyakh@akulyakh:~/NetBeansProject/CapsLock/src$ java CapsLock
      Caps lock now: off
      java.lang.UnsupportedOperationException: Toolkit.setLockingKeyState
      at java.awt.Toolkit.setLockingKeyState(Toolkit.java:1441)
      at CapsLock.toolkitToggleCapsLock(CapsLock.java:11)
      at CapsLock.main(CapsLock.java:45)
      Toggled by toolkit. Caps lock now: off
      Toggled by robot. Caps lock now: on
      akulyakh@akulyakh:~/NetBeansProject/CapsLock/src$ java CapsLock
      Caps lock now: on
      java.lang.UnsupportedOperationException: Toolkit.setLockingKeyState
      at java.awt.Toolkit.setLockingKeyState(Toolkit.java:1441)
      at CapsLock.toolkitToggleCapsLock(CapsLock.java:11)
      at CapsLock.main(CapsLock.java:45)
      Toggled by toolkit. Caps lock now: on
      Toggled by robot. Caps lock now: off

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                akulyakh Alexander Kulyakhtin (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: