awt_Component::GetJavaModifiers() should use GetKeyState() not GetAsyncKeyState(

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.4.0
    • Component/s: client-libs
    • None
    • unknown
    • generic

      The method GetJavaModifiers() in src/win32/native/sun/windows/awt_Component.cpp calls GetAsyncKeyState() to get the state of the Control, Shift, etc. keys and then packages this info up into events (e.g. a WmKeyDown event). GetAsyncKeyState() gets the state of the keyboard at the time of the call, rather than at the time of the event (compare to GetKeyState()). This isn't a problem for user-driven input (e.g. a user hitting CTRL-RightArrow), but is a problem for native programs that generate keystrokes automatically, such as macro generators or screen readers. In fact, this is specifically a problem for the JAWS screen reader, which in some circumstances programatically generates CTRL-arrow key combinations.

            Assignee:
            Eric Hawkes (Inactive)
            Reporter:
            Peter Korn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: