From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Trey Peacock Newsgroups: gmane.emacs.devel Subject: Re: PGTK-related misconceptions Date: Wed, 27 Jul 2022 08:34:27 +0000 Message-ID: <87bktbdkdw.fsf@treypeacock.com> References: <87y202f4dq.fsf@treypeacock.com> <87o80xhor2.fsf@yahoo.com> <877d7lrbta.fsf@treypeacock.com> <87czdszy2r.fsf@akirakyle.com> <875yjkzkuc.fsf@yahoo.com> <87fsino7gd.fsf@akirakyle.com> <87lesfuv89.fsf@yahoo.com> Reply-To: Trey Peacock Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16430"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Morgan Smith , emacs-devel@gnu.org To: Po Lu , Akira Kyle Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 27 10:53:47 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGcna-00046l-6o for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Jul 2022 10:53:47 +0200 Original-Received: from localhost ([::1]:39454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGcnY-0007ro-BW for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Jul 2022 04:53:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGcVJ-00047q-L4 for emacs-devel@gnu.org; Wed, 27 Jul 2022 04:34:54 -0400 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]:56988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGcVF-0002cX-R4 for emacs-devel@gnu.org; Wed, 27 Jul 2022 04:34:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=treypeacock.com; s=protonmail3; t=1658910875; x=1659170075; bh=eIhb5jhtLzr55wDNdop/ekoT4fMkjv3XSqmoi3WmYGU=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=j2vjz+TdkSza4i+eFk5lowCbITyLG5mSiZN2D9DTGNhxVPgyq7DEy+iqehcGFKC4p p4q0TRn7HjW8OQNJICIbzmETDmNZ6klNTJ8INtoBNP7HdNR6YZCgemC76lCDhxADFr eKOoeUTPkiDJuBq4HGi78YKf2GJLDJP/YsGULFWVTwX2JdJ9AjgU/fOHgW3dS5OGlA qhQnv3pKsFXiEwQ4vmSV9waS8M+3aRgYEzV0ASNZRpWMdhu0z6pDtQZtPT1owxW6WW bs8WrJ2199PoB5UiHhOhFjOgLzPEbRYdzG9L5qNYEF7rYCf8Tvmb77mCpRhoo5NAdS laXWfWZQzHMKw== In-Reply-To: <87lesfuv89.fsf@yahoo.com> Feedback-ID: 17020329:user:proton Received-SPF: pass client-ip=188.165.51.139; envelope-from=gpg@treypeacock.com; helo=mail-0301.mail-europe.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292735 Archived-At: "Po Lu" writes: > 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 |=3D GDK_SUPER_MASK; > > which is called from deliver_key_event and keyboard_handle_modifiers in > gdkdevice-wayland.c: > > seat->key_modifiers =3D 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.) This section of code is in gdkkeys-x11.c and called from update_keymaps: mask =3D 0; for (j =3D 0; j < keymap_x11->keysyms_per_keycode; j++) { if (syms[j] =3D=3D GDK_KEY_Meta_L || syms[j] =3D=3D GDK_KEY_Meta_R) mask |=3D GDK_META_MASK; else if (syms[j] =3D=3D GDK_KEY_Hyper_L || syms[j] =3D=3D GDK_KEY_Hyper_R) mask |=3D GDK_HYPER_MASK; else if (syms[j] =3D=3D GDK_KEY_Super_L || syms[j] =3D=3D GDK_KEY_Super_R) mask |=3D GDK_SUPER_MASK; } Which seems like it accepts the GDK_KEY_Super_L/R and subsequently sets the mask, right? I believe this is the reason why the virtual mask is recognized when using Xwayland on wlroots based compositors.