Mac: correct KeyEvent.PRESS/TYPED/RELEASE behavior wrt. auto-repeat feature

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • fx2.0.2
    • Affects Version/s: fx2.0.2
    • Component/s: javafx
    • None
    • Environment:

      Mac

      Glass on Mac sends a PRESS key event for each keyDown native notification regardless of whether this is an auto-repeat press event or not.

      Also, the TYPED event is generated synthetically just after the PRESS event. (see GlassView2D/3D.m keyDown:).

      On Windows when OS generates auto-repeat key press events, the event sequence is as following:

      PRESS
      TYPED
      TYPED
      ...
      RELEASE

      We need to make Glass on Mac behave the same way.

      Also note that for Cmd+<> key sequences Mac doesn't generate a RELEASE event, therefore we syntehsize the event ourselves (see GlassViewDelegate.m sendJavaKeyEvent:). According to the events provide by the native OS, it seems that if user holds a Cmd+<> key and the system generates auto-repeat events, we have no choice but generate

      PRESS
      TYPED
      RELEASE
      PRESS
      TYPED
      RELEASE
      ...

      Seems that for Cmd+<> key combinations this is unavoidable.

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

              Created:
              Updated:
              Resolved:
              Imported: