Re: Different keycodes for shifted characters under Wayland vs X11
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <[email protected]> |
Apparently paste image in groups editor is a known bug. Last try: X11: [image: x11.png] Wayland: [image: wayland.png] On Saturday, April 29, 2023 at 2:52:54 AM UTC-7 [email protected] wrote: > (Hmm. Google groups editor swallowed my images. Trying again) > > wxWidgets 3.2.2.1, built from source > > Linux (Ubuntu 22.04 LTS) > > Run the 'keyboard' sample and press <shift>-3 to type a ‘#’ character. > > Under X11 (forced by setting GDK_BACKEND=x11 env var), I get the same > behavior I see on MacOS and Windows: keydown on ‘3 (code=51)’, with shift > modifier set. > > $ GDK_BACKEND=x11 ./wxWidgets-3.2.2.1/buildgtk/samples/keyboard/keyboard > > > > > Under Wayland (no env var set, default for Ubuntu 22.04), I see keydown on > ‘#’ (code=35), with shift modifier set. > > $ ./wxWidgets-3.2.2.1/buildgtk/samples/keyboard/keyboard > > > > My app makes use of unmodified keys for shortcuts (like GIMP and > Inkscape); so the operation bound to ‘#’ is now unusable on Wayland, > because my code is expecting <shift>-3, not <shift>-#. > > Found this on wxPython. I’m assuming it’s a GTK issue, not wxWidgets. > Frustrating that multiple layers of cross-platform toolkits (Gtk, > wxWidgets, wxPython) are exposing an inconsistency within one platform! But > also interesting that Inkscape, a GTK app that does run on Wayland, has > default shortcuts bound to both ‘3’ and ‘#’ that appear to work correctly. > So maybe it is wxGTK? > > > Either way: what’s the recommended approach here? Do I just declare I > don’t support Wayland, or start special-casing code for X11 vs Wayland? > > > Thanks for any help/suggestions. > > -ck > > > > On Saturday, April 29, 2023 at 2:49:18 AM UTC-7 [email protected] wrote: > >> wxWidgets 3.2.2.1, built from source >> >> Linux (Ubuntu 22.04 LTS) >> >> Run the 'keyboard' sample and press <shift>-3 to type a ‘#’ character. >> >> Under X11 (forced by setting GDK_BACKEND=x11 env var), I get the same >> behavior I see on MacOS and Windows: keydown on ‘3 (code=51)’, with shift >> modifier set. >> >> $ GDK_BACKEND=x11 ./wxWidgets-3.2.2.1/buildgtk/samples/keyboard/keyboard >> >> >> Under Wayland (no env var set, default for Ubuntu 22.04), I see keydown >> on ‘#’ (code=35), with shift modifier set. >> >> $ ./wxWidgets-3.2.2.1/buildgtk/samples/keyboard/keyboard >> >> My app makes use of unmodified keys for shortcuts (like GIMP and >> Inkscape); so the operation bound to ‘#’ is now unusable on Wayland, >> because my code is expecting <shift>-3, not <shift>-#. >> >> Found this on wxPython. I’m assuming it’s a GTK issue, not wxWidgets. >> Frustrating that multiple layers of cross-platform toolkits (Gtk, >> wxWidgets, wxPython) are exposing an inconsistency within one platform! But >> also interesting that Inkscape, a GTK app that does run on Wayland, has >> default shortcuts bound to both ‘3’ and ‘#’ that appear to work correctly. >> So maybe it is wxGTK? >> >> >> Either way: what’s the recommended approach here? Do I just declare I >> don’t support Wayland, or start special-casing code for X11 vs Wayland? >> >> >> Thanks for any help/suggestions. >> >> -ck >> >> >> >> -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/af01c394-e9d6-4f30-a9df-ae3856e30e4an%40googlegroups.com.
wayland.png
(image/png, 37.5 KB) - not displayed
x11.png
(image/png, 35.2 KB) - not displayed