Subject: bug#55660: 29.0.50; PGTK degrades to terminal-compatible keyboard events

From: Derek Upham <[email-masked]>
Date: Fri, 27 May 2022 08:53:35 -0700

Po Lu <[email-masked]> writes:

> Eli Zaretskii <[email-masked]> writes:
>
>> Thanks, but shouldn't the heading line of the entry you added 
>> be
>> qualified with "in PGTK builds"? or maybe "in GTK and PGTK 
>> builds"?
>
> It's already under "Runtime problems specific to PGTK".

How about this?

** Keyboard behavior depends on your GTK input method

The GTK3 libraries may interpret and process keypresses as part of 
the
current GTK input method, before passing them as input events to 
Emacs.
GTK applications like PGTK Emacs configure their input method
automatically based on environment variables, particularly LANG 
and
GTK_IM_MODULE.

If you notice differences in keyboard behavior depending on how 
you
start PGTK Emacs, compare your environments using 
`process-environment'.
For example, you may see behavior differences when running Emacs 
out of
a systemd unit file, compared to running Emacs from the command 
line.
Input methods may also cause the keyboard behavior to change if 
you
switch from a GTK-based build to a PGTK-based build.

Emacs may reveal bugs that are in the input method libraries. 
Those
libraries are out of Emacs's control, but you can tell PGTK Emacs 
to
bypass input methods entirely using an Emacs Lisp function:

  M-: (pgtk-use-im-context nil)