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.
The
GEventtype supports aKEY_EVENTcategory which includesKEY_PRESSED,KEY_RELEASED, andKEY_TYPED. TheGWindowtype, however, does not generateGEvents in response to aKEY_EVENT.I think (?) it's due to the following. The
GWindowtype wraps an_Internal_QMainWindowobject. The_Internal_QMainWindow::keyPressEventfunction forwards to the superclass is aQMainWindow, which does not overridekeyPressEvent, so the super call goes toQWidget, which only useskeyPressEventto handle window closures. Afterwards,_Internal_QMainWindow::keyPressEventcallsGWindow::processKeyPressEventInternal, which does nothing. That would probably be the place to add the hook to add a correspondingGEventto the event queue.