From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Derek Upham Newsgroups: gmane.emacs.bugs Subject: bug#55660: 29.0.50; PGTK degrades to terminal-compatible keyboard events Date: Thu, 26 May 2022 07:43:37 -0700 Message-ID: <87bkvktkva.fsf@priss.frightenedpiglet.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="24801"; mail-complaints-to="usenet@ciao.gmane.io" To: 55660@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 26 16:44:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nuEii-0006Iw-ME for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 16:44:12 +0200 Original-Received: from localhost ([::1]:43518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuEih-0008VG-E9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 10:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEia-0008To-K8 for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 10:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuEiY-00061U-3y for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 10:44:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuEiY-0006ii-2O for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Derek Upham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 May 2022 14:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55660 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165357623925814 (code B ref -1); Thu, 26 May 2022 14:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 May 2022 14:43:59 +0000 Original-Received: from localhost ([127.0.0.1]:59723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuEiU-0006iI-UD for submit@debbugs.gnu.org; Thu, 26 May 2022 10:43:59 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:50786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuEiS-0006i9-0F for submit@debbugs.gnu.org; Thu, 26 May 2022 10:43:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEiQ-0008L4-5b for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 10:43:55 -0400 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]:57710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEiK-000606-7g for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 10:43:53 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by wilbur.contactoffice.com (Postfix) with ESMTP id 8A1CC8BD for ; Thu, 26 May 2022 16:43:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1653576223; s=20210208-e7xh; d=mailfence.com; i=derek_upham@mailfence.com; h=From:Date:Message-ID:MIME-Version:Content-Type; l=1668; bh=pkeTd0EBBbMD/0nFVk9Okr/VmwhK8P5apPNJvmd7LsE=; b=5SlRHvvpFTayuIwGptW4E+xyJ/EgeELoc1+brT3Dhu7kkGCE84qH3FZ7bGP/YDHP W5l6UX9UstBBWKm0Hi7S7t8ATkL1+1lZFjgaf7EWnmw1yaqcUp3iQi9TluBid4ywwJD xM4s9UFTrmAmvti/ckvl1+n17Nl5TnJWezSBW8VpkdqUVhf+RX5XRNlnBGFTLKGuHo3 t+W4r917A6xDMMR3MHD5KOENNNCfAQ78H3tm8diMFTOf8vbWnnMRvJlWHzkJf46F3zw wx9JCZcK6kjX8KF8FeRyY+UEf78nc8kffVfywMf+QhP8H/YdpolEmv1UsNBjEZwC5Br NIlKE5UohA== Original-Received: by smtp.mailfence.com with ESMTPSA for ; Thu, 26 May 2022 16:43:40 +0200 (CEST) Original-Received: from [::1] (helo=priss.frightenedpiglet.com) by priss.frightenedpiglet.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nuEi9-005ec2-TA for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 07:43:37 -0700 X-ContactOffice-Account: com:175140567 Received-SPF: pass client-ip=212.3.242.68; envelope-from=derek_upham@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233114 Archived-At: Meaningful control keys in ASCII are @, A-Z, [ \ ] ^ and _ (0x40 through 0x5f). VT100 terminals use the Control key to zero-out the top two bits of seven, leaving us with 2^5=32 characters. The above control keys happen to be a bank of 32 that are all graphical and easy to reach.) I have old notes to myself that say that VT100 terminals do a little extra mapping: Control and `?' (0x3f) sends the DEL keycode (0xff); Emacs itself seems to map Control and `/' (0x2f) to the same keycode as Control and `_' (0x1f)). Window system interfaces like GTK track individual keypresses, and Emacs supports binding other keys with Control: (global-set-key [(control ?<)] 'my-left-command) (global-set-key [(control ?>)] 'my-right-command) Some terminals even send special character sequences to Emacs that encode the Control modifier alongside the ">" character. Xterm is one of those, if you use the "xterm" terminal type. I was experimenting with Emacs configurations (in a weekly snapshot) and discovered that the PGTK interface does not support arbitrary Control modifiers. I can send any of the ASCII control keys listed above, but for all others PGTK ignores the Control modifier. Control-> turns into a plain ">", for example. These configuration options have the bug: --with-x-toolkit=gtk3 --with-xwidgets=yes --with-pgtk=yes These configuration options understand Control-> correctly. --with-x-toolkit=gtk3 --with-xwidgets=yes --with-pgtk=no I'm aware that PGTK is under active development and unreliable, and the immediate workaround is "stop using PGTK". Derek -- Derek Upham derek_upham@mailfence.com