From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55660: 29.0.50; PGTK degrades to terminal-compatible keyboard events Date: Fri, 27 May 2022 08:19:51 +0800 Message-ID: <87zgj3j07s.fsf@yahoo.com> References: <87bkvktkva.fsf@priss.frightenedpiglet.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7090"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 55660@debbugs.gnu.org To: Derek Upham Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 27 02:21:19 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 1nuNjB-0001bH-DT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 May 2022 02:21:17 +0200 Original-Received: from localhost ([::1]:33278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuNjA-0003BH-0D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 20:21:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuNiw-0003B8-LC for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 20:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuNiw-0000Q6-A2 for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 20:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuNiw-0002SI-5V for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 20:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 May 2022 00:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55660 X-GNU-PR-Package: emacs Original-Received: via spool by 55660-submit@debbugs.gnu.org id=B55660.16536108079349 (code B ref 55660); Fri, 27 May 2022 00:21:02 +0000 Original-Received: (at 55660) by debbugs.gnu.org; 27 May 2022 00:20:07 +0000 Original-Received: from localhost ([127.0.0.1]:60298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuNi3-0002Qj-Bt for submit@debbugs.gnu.org; Thu, 26 May 2022 20:20:07 -0400 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:42258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuNi1-0002Q8-BW for 55660@debbugs.gnu.org; Thu, 26 May 2022 20:20:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653610799; bh=+5y8PbYEtqYbGt3Z98mYKic7A/zHw6nsNs/OHl+hfzM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=bKqNfF783tPXKCaNQ9zwgLo4MgfKiN27482l0oBXDqMAA2YdJQa/cCqV199gqSy4g8Gf8kcxjNrJnDwibjMHToYB0Iz/8iKe4J7ltcn7GzdLy+GJnWRRLq1nv9E62ktJultFQWwtj/slMbuftjJwDtgoRHCk9GL7YtXxD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OyeL53znWpoeYWUGLPqiQwJ8TcPIsAXJ6iUIemYuAHES3AO5sLx76vwly1IAK BkbBNSr5XRDlBbjtR1ytmFA4_6nrOF7a_H9F7.LfRC..Uqui1wAOEP1vO5v5tqSCIzdCOQoabAL0 ARhWvQngowmnVLA7iZN6c3QocoWFlQwnSFGNI2AafqrUocims_iPOBGX57qw99XWd0TuTDDr4J7p 6giAjfjNxtQHpsNXHT6oRB.FxtCWkIv1a4w9BO9xuQYgOm7SY527c6Zxdp4U616LhkxMyQhHw7Ll wuhmc7ST_vu5PFMPndEgwbQBxLSMZYdO8v.X60vzJp1vddxkbW6mNEqPZfS5FONMPZlGP6_FIhrk cQzkZB1QvDW.KOPoA1NpvoXAN6z1vxDgiFy3cFm5gCUarM6Dz_CA0mXOnhWYYzqLGIWLZ1u5836B PJSUggDCT5s0A6luWRQ1hKfuFils2RNQgKtKP3lwhs X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Fri, 27 May 2022 00:19:59 +0000 Original-Received: by hermes--canary-production-sg3-5f7658c994-m7v88 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 05691ec0aababc40a2dd01a972ddb30f; Fri, 27 May 2022 00:19:56 +0000 (UTC) In-Reply-To: <87bkvktkva.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Thu, 26 May 2022 07:43:37 -0700") X-Mailer: WebService/1.1.20225 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:233133 Archived-At: Derek Upham writes: > 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 What happens if you turn off input method support, by evaluating (pgtk-use-im-context nil)? In general, these problems are not with Emacs, but with GTK input method modules, and should be reported to their developers instead. Emacs never "degrades" to "terminal-compatible" input events when using a window system. We directly use whatever it reports.