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

Mac: key codes for non-US English keyboard layouts may be incorrect

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Mac

      Description

      This is a follow-up for a MS Windows-specific bug RT-32300. Note that the AWT/Swing in JDK suffer from the same bug as well.

      The keys corresponding to Window's VK_OEM_1 ... VK_OEM_7 ( ;: + , - . /? `~ [{ \| }] '" ) always generate the following key codes on Mac:

              case 0x29:
              case 0x18:
              case 0x2B:
              case 0x1B:
              case 0x2F:
              case 0x2C:
              case 0x32:
              case 0x21:
              case 0x2A:
              case 0x1E:
              case 0x27:

      Note that I was unable to find keys that would generate the VK_OEM_8 and VK_OEM_102 on my keyboard.

      The value of the characters: property depends on the key and the event:

      1. For regular keys it contains the actual character for the current keyboard layout. E.g. it is the + character for the }] key when the German layout is active.

      2. For dead keys: the keyDown: provides an empty characters: array. The keyUp:, however, gives the symbolic representation of the dead key released.

      Another issue is that, for example, in German layout the Z and Y keys are switched. The characters: for both keyDown: and keyUp: provides the correct values, but the keyCode is wrong when the German layout is active (it reports the Z keyCode for the key that generates the 'Y' character).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                anthony Anthony Petrov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported: