Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
htiek opened this issue Aug 14, 2024 · 0 comments
Open

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

htiek opened this issue Aug 14, 2024 · 0 comments

Comments

@htiek
Copy link
Collaborator

htiek commented Aug 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant