Community
Participate
Working Groups
In a simple snippet that creates a TraverseListener, with a print statement if one is detected, I observe that nothing is printed in GTK4. In GTK3 this works with no issues but in GTK 4 I can see that no TraverseEvent is created.
It appears that there is no event being emitted when TAB is pressed, or the method used to emit the key press is not being captured by SWT. A relevant line from the GTK4 docs that was not present in the GTK3 docs: "GTK reserves the Tab key to move the focus to the next location, and Shift-Tab to move it back to the previous one", maybe this causes issues? Also a relevant bug that is currently still open in the Gnome issues tracker: https://gitlab.gnome.org/GNOME/gtk/-/issues/3544. I will continue investigating, but this might require a native snippet to check how TAB is handled in the text widget.
With the patches to bugs 579299 and 579056, tab traverse events are now working! Tested using Snippet 241 to verify it works as expected in GTK4.