unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Derek Upham <derek_upham@mailfence.com>
Cc: 55660@debbugs.gnu.org
Subject: bug#55660: 29.0.50; PGTK degrades to terminal-compatible keyboard events
Date: Fri, 27 May 2022 08:19:51 +0800	[thread overview]
Message-ID: <87zgj3j07s.fsf@yahoo.com> (raw)
In-Reply-To: <87bkvktkva.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Thu, 26 May 2022 07:43:37 -0700")

Derek Upham <derek_upham@mailfence.com> 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.





  reply	other threads:[~2022-05-27  0:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 14:43 bug#55660: 29.0.50; PGTK degrades to terminal-compatible keyboard events Derek Upham
2022-05-27  0:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-27  1:13   ` Derek Upham
2022-05-27  1:59     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-27  5:53       ` Eli Zaretskii
2022-05-27  6:06         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-27  7:07           ` Eli Zaretskii
2022-05-27  8:00             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-27 15:53               ` Derek Upham
2022-05-28  0:41                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgj3j07s.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=55660@debbugs.gnu.org \
    --cc=derek_upham@mailfence.com \
    --cc=luangruo@yahoo.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).