From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: PGTK-related misconceptions Date: Wed, 27 Jul 2022 10:48:06 +0800 Message-ID: <87lesfuv89.fsf@yahoo.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1955"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Trey Peacock , Morgan Smith , emacs-devel@gnu.org To: Akira Kyle Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 27 04:49:16 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 1oGX6p-0000MX-Hg for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Jul 2022 04:49:15 +0200 Original-Received: from localhost ([::1]:48626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGX6o-0006Da-1y for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Jul 2022 22:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGX63-0005YL-5n for emacs-devel@gnu.org; Tue, 26 Jul 2022 22:48:27 -0400 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]:44821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGX60-0004vV-GX for emacs-devel@gnu.org; Tue, 26 Jul 2022 22:48:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658890100; bh=AfLm/AQkyjx3S+Mfl0vru0JpJUQ7PLmewWear2V0z+U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=VuOJ1+FLyHIhBRil1WGyp8J999NXycniHFax8FaT4fa5pyYUsg5+DK2JAV553yHy5aGF/KwqjOT0imVV0u4iQrNyi3fuR9AeCb3ADCe/Mvls7CaB/XSs41QBD03T1qzeVyXI2uNGpTMl560xb36cAX3aNmQJ5KXaHnJJZTwOXZJVAcwFWMDiAqtGaPaQznZI54PlZx+6YvQ14x8la00bqsDCRYqY7i1FZPsCvQc+mGkBPBvajCOY8Z/8uXFvd0dlnaFCtBDOG97eklwR49RDwqpLlR3ff2GA7cz8Azm6qGDYMzvD6jnirPHD0/5CuhlWsVyfLK7vvrg9KWQWAXdsHw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658890100; bh=jSfeizHWpBxj8Xh9m6j153+DdgUPrfVx3bWCFK8UMGb=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=o5VNrBI6BkQYERi45RGO8pRdFEvQvDwdbKHS52w8gCf51T/NaunFVpDE6GHJfxJvhbvXGdkD8qKiZJhdex6jFUPT4mWVSS06RKqey/Wq9lB0xWhoFKeKpG7XXB9KPhfdmKQrmFzAIp2Z2riGnGo+NKzlMO/LUulc1nRzo6q/stTT+y+pILzRMfpnppc4xA2sNcJk1Azaogk49TTj1u8WvZNsJdNEbM8QAqz0VaFAnP9PWp84PRnpFYsXzJsKwvgWUnPhJAbwBVpjzeZ5VvoM8cnzDRjvv3PjnrMjjIglDa3gHT+PDQb1C1HEi2BAox+sJq3pNeZpeEdhWAFk/qpH+w== X-YMail-OSG: JI3mxw8VM1kJO53u30KkVjht5q46i6Q336B2vKFNswZxryU4HIfWo_YRqFNM7yo Xx2fdwqtpd6KIE6NUATHBBVcj30NBpbiaWDaXaYyGD2BJFgxD6OG_5PrO6xgOGhkxHK.sicYcF2j YIZcAQEPdqyw6u01eASwWyHzQIZFp.PZiyCgeHlV_YJMkcaN9ZYVtkcHvAeOwrZ6_.HxVR7g01sj NtCZXUOzpMhj.IQU243Ec3Ib6h36h6CYNifziTMRO6UOtIJmTCcfdyikIKSs3zmOR5GCyz2PDByq ljjJz02A9k6VhFzU8YyctEB_0yswaQ_TKTTTecANRsw18ox2LqQh0TjEOs5fdGh2QT27BakzEAOP 5ulz2Nlk.0Cb5mbrOp8X07SDZ85BSHHdcZmhfayiCyw44oV7p8WKRMApxHPICGMp3MJ1r352xaYe ZZK_tNeG7eQhNYr8V_ri3PWRFr35Uvf2gIvsFad7e2e2CBlkkDigkpx5pntbr0dKBxdVgX1lfQGe MaDP6fVpOeu4QTjsks8abj3.EJ.HHHvwPVCF4JeayMS9zLr1zlCY1usJybE5Ffrf3k5yr8VQWb6V QyUB9JBtDN60sFJ9wRTfoF.831RPlGTZg20YUnPobHo0W5mLBG5HRUQSRQCLJVfC48Tj72dmXP.H VRU4aMWMW5lhgnuJuV.1J1wjsxs1PP7HB7HM.KMbKOIUkQyLd9ks10XA8vTZE5KXsXeoPchm6ixW ZcvmICgobIX3dDjmpBYfpL5GUW5RaHHAlT7nANiW45yVV7DmbYhv8kvsLkbbZDsXJN2riUTmsVU4 HsJcGjZSNdD_y_9uXW_ILE.GuXHAgZaDxx8fLguDZG X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Wed, 27 Jul 2022 02:48:20 +0000 Original-Received: by hermes--canary-production-sg3-854c886654-lnkzb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fbde149009a0de6045ee62e0dc0d791d; Wed, 27 Jul 2022 02:48:13 +0000 (UTC) In-Reply-To: <87fsino7gd.fsf@akirakyle.com> (Akira Kyle's message of "Tue, 26 Jul 2022 15:36:15 -0600") X-Mailer: WebService/1.1.20447 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.147; envelope-from=luangruo@yahoo.com; helo=sonic316-21.consmr.mail.ne1.yahoo.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:292724 Archived-At: Akira Kyle 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 as Super whereas under wayland > with sway, emacs does not respond to . The relevant lines from > the xkb_symbols section are > > key { [ Super_R ] }; > modifier_map Mod4 { }; > > 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 > 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.