From: Po Lu <luangruo@yahoo.com>
To: Akira Kyle <akira@akirakyle.com>
Cc: Trey Peacock <gpg@treypeacock.com>,
Morgan Smith <morgan.j.smith@outlook.com>,
emacs-devel@gnu.org
Subject: Re: PGTK-related misconceptions
Date: Wed, 27 Jul 2022 10:48:06 +0800 [thread overview]
Message-ID: <87lesfuv89.fsf@yahoo.com> (raw)
In-Reply-To: <87fsino7gd.fsf@akirakyle.com> (Akira Kyle's message of "Tue, 26 Jul 2022 15:36:15 -0600")
Akira Kyle <akira@akirakyle.com> writes:
> This does not appear to work. I can attach the full .xkb file that
> xkbcomp generated if you like, but it's the default which you get from
> the following under the v2.34 xkeyboad-config files.
>
> xkb_keymap "my_dvorak_super" {
> xkb_keycodes { include "evdev" };
> xkb_compatibility { include "complete" };
> xkb_types { include "complete" };
> xkb_symbols { include "us(dvorak)+pc(pc105)" };
> };
>
> Specifically, when I use the same .xkb file under X I get that emacs
> interprets the physical keycode <RWIN> as Super whereas under wayland
> with sway, emacs does not respond to <RWIN>. The relevant lines from
> the xkb_symbols section are
>
> key <RWIN> { [ Super_R ] };
> modifier_map Mod4 { <RWIN> };
>
> Reading through the links that Trey sent in previous emails to the gtk
> source which handles modifier keys in x11 versus wayland, I'm pretty
> convinced his diagnosis is correct.
> Namely gtk behaves differently in stetting GDK_SUPER_MASK on x11
> versus wayland where on the former seeing the "Super_R" symbol will
> set the mask while on the latter, only the virtual modifier "Super"
> will set GDK_SUPER_MASK.
That's because the Wayland compositor isn't sending a keymap that makes
libxkbcommon assign Mod4 to Super. See this bit of gdkkeys-wayland.c:
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Super")))
state |= GDK_SUPER_MASK;
which is called from deliver_key_event and keyboard_handle_modifiers in
gdkdevice-wayland.c:
seat->key_modifiers = gdk_keymap_get_modifier_state (keymap);
and uses an XKB keymap created in _gdk_wayland_keymap_update_from_fd.
It is not a bug in GTK, but a bug in the default configuration of the
Wayland compositor (regardless of what their developers say.)
> Although it seems like in principle, one should be able to get xkb to
> set the "Super" virtual modifier so that GTK correctly picks it up in
> it's wayland code. However thus far I have been unable to make a set
> of xkb rules which will trigger the "Super" virtual modifier for the
> <RWIN> keycode despite much effort. Perhaps this is possible and I
> just don't understand xkb's rules sufficiently, or perhaps there is
> some issue in xkb which is preventing from GTK to picking up the
> "Super" virtual modifier. Thus far I have tried many variations on
Could you please send the entire XKB file generated? Thanks.
next prev parent reply other threads:[~2022-07-27 2:48 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 21:50 PGTK-related misconceptions Trey
2022-04-19 0:59 ` Po Lu
2022-04-19 3:28 ` Trey Peacock
2022-04-19 4:27 ` Po Lu
2022-04-19 23:02 ` Trey Peacock
2022-04-20 0:48 ` Po Lu
2022-04-20 2:33 ` Trey Peacock
2022-04-20 4:05 ` Po Lu
2022-07-25 21:18 ` Akira Kyle
2022-07-26 2:08 ` Po Lu
2022-07-26 12:10 ` Lars Ingebrigtsen
2022-07-26 12:35 ` Po Lu
2022-07-29 14:26 ` Stefan Monnier
2022-07-30 0:58 ` Po Lu
2022-07-26 21:36 ` Akira Kyle
2022-07-27 2:48 ` Po Lu [this message]
2022-07-27 8:34 ` Trey Peacock
2022-07-27 9:10 ` Po Lu
2022-07-27 13:45 ` Trey Peacock
2022-07-27 13:52 ` Po Lu
2022-07-28 1:39 ` Akira Kyle
2022-07-28 2:50 ` Po Lu
-- strict thread matches above, loose matches on Subject: below --
2022-04-20 7:52 Trey Peacock
2022-04-20 8:25 ` Po Lu
2022-04-20 13:13 ` Brian Cully
2022-04-15 2:01 bug#53200: 29.0.50; C-S-u shortcut fails with 'PGTK' enable Morgan Smith
2022-04-15 2:29 ` PGTK-related misconceptions Po Lu
2022-04-15 7:11 ` Byung-Hee HWANG
2022-04-15 16:24 ` Eric Abrahamsen
2022-04-18 5:18 ` Sean Whitton
2022-04-18 5:31 ` Po Lu
2022-04-18 5:43 ` Sean Whitton
2022-04-18 5:57 ` Po Lu
2022-04-18 18:27 ` Sean Whitton
2022-04-18 19:49 ` Jim Porter
2022-04-19 1:02 ` Po Lu
2022-04-19 2:46 ` Sean Whitton
2022-04-19 2:18 ` Tim Cross
2022-04-19 5:56 ` Eli Zaretskii
2022-04-19 8:13 ` Tim Cross
2022-04-19 10:32 ` Eli Zaretskii
2022-04-19 9:10 ` Dirk-Jan C. Binnema
2022-04-19 10:42 ` Po Lu
2022-04-19 11:53 ` Phil Sainty
2022-04-19 13:58 ` Sean Whitton
2022-04-20 3:29 ` Phil Sainty
2022-04-20 4:48 ` Stefan Monnier
2022-04-19 16:51 ` Yuri Khan
2022-04-22 5:44 ` Pankaj Jangid
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lesfuv89.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=akira@akirakyle.com \
--cc=emacs-devel@gnu.org \
--cc=gpg@treypeacock.com \
--cc=morgan.j.smith@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.