Skip to content

GWindow key events are not forwarded to the event queue as GEvents. #80

Description

@htiek

The GEvent type supports a KEY_EVENT category which includes KEY_PRESSED, KEY_RELEASED, and KEY_TYPED. The GWindow type, however, does not generate GEvents in response to a KEY_EVENT.

I think (?) it's due to the following. The GWindow type wraps an _Internal_QMainWindow object. The _Internal_QMainWindow::keyPressEvent function forwards to the superclass is a QMainWindow, which does not override keyPressEvent, so the super call goes to QWidget, which only uses keyPressEvent to handle window closures. Afterwards, _Internal_QMainWindow::keyPressEvent calls GWindow::processKeyPressEventInternal, which does nothing. That would probably be the place to add the hook to add a corresponding GEvent to the event queue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions