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

Mac: Command-period generates spurious KeyEvents on Mac OS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u60
    • 8u5
    • javafx
    • Mac OS 10.9.3

      Pressing meta-. on Mac OS generates spurious events in addition to the normal events.

      Pressing meta-, shows the expected sequence of events:
      type=KEY_PRESSED code=COMMAND mods=[meta] char='' ( 0)
      type=KEY_PRESSED code=COMMA mods=[meta] char='' ( 0)
      type=KEY_TYPED code=UNDEFINED mods=[meta] char=',' ( 44)
      type=KEY_RELEASED code=COMMA mods=[meta] char='' ( 0)
      type=KEY_RELEASED code=COMMAND mods=[] char='' ( 0)

      Pressing meta-. generates two additional events:
      type=KEY_PRESSED code=COMMAND mods=[meta] char='' ( 0)
      type=KEY_PRESSED code=PERIOD mods=[meta] char='' ( 0)
      type=KEY_TYPED code=UNDEFINED mods=[meta] char='.' ( 46)
      type=KEY_RELEASED code=PERIOD mods=[meta] char='' ( 0)
      type=KEY_PRESSED code=A mods=[] char='' ( 0)
      type=KEY_TYPED code=UNDEFINED mods=[] char=' ( 27)
      type=KEY_RELEASED code=COMMAND mods=[] char='' ( 0)

      A KEY_PRESSED with keycode 'A' followed by a KEY_TYPED with the ASCII escape character as its character value.

      The spurious events are not generated when running the same program in Ubuntu Linux 12.04.

      On Windows 8 the right Windows key generates no events whatsoever, and the left Windows key generates PRESSED and RELEASED for the WINDOWS key itself, and only RELEASED for the PERIOD key. No PRESSED or TYPED are generated for the PERIOD. Presumably this is because Windows-. means something to Windows 8, because Windows-/ for example generates the normal sequence of events (WINDOWS PRESSED, SLASH PRESSED, '/' TYPED, SLASH RELEASED, WINDOWS RELEASED). In any case, no spurious events are generated on Windows either.

            morris Morris Meyer (Inactive)
            mbaynejfx Michael Bayne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: