help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK Emacs and input modules


From: Po Lu
Subject: Re: GTK Emacs and input modules
Date: Sun, 04 Sep 2022 08:38:30 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Yuri Khan <yuri.v.khan@gmail.com> writes:

> Hello,
>
> Can someone please consult me on Emacs’s interaction with GTK input modules?
>
> Steps:
>
> 1. $ emacs -Q
> 2. C-h k C-S-u
>
> Observed: no reaction.
>
> 3. C-S-u
>
> Observed: Emacs gets into a state where it ignores any keys except
> ESC, 0-9, a-f, A-F, RET, SPC. Pressing any of these keys except RET
> takes it out of this state.
>
> 4. C-h k C-; (also C-., C-,, C-0, C-1, C-9)
>
> Observed: C-; is undefined. (C-0, C-1, C-9 run the command digit-argument.)
>
> So: things mostly work but C-S-u doesn’t.
>
> Same behavior with $ GTK_IM_MODULE=ibus emacs.
>
> ----
>
> 1. $ GTK_IM_MODULE=xim emacs
> 2–4. same
>
> Observed: C-u (translated from C-S-u) runs the command universal-argument.
>
> ; runs the command self-insert-command.
> . runs the command self-insert-command.
> , runs the command self-insert-command.
> 0 runs the command self-insert-command.
> 1 runs the command self-insert-command.
> 9 runs the command self-insert-command.
>
> So: Now C-S-u works but a bunch of other keys lose their Ctrl.
>
> ----
>
> If I set GTK_IM_MODULE to pretty much any other value from the list I
> get from running
> /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0, C-S-u
> displays an underlined letter ‘u’, then ignores any keys except ESC,
> SPC, RET, 0-9, a-f, A-F.
>
> ----
>
> How can I get all of C-S-u, C-;, C-., C-, C-0, C-1, C-9 keys in GTK Emacs?
>
> (Of course I want C-S-u for insert-char. No, C-x 8 RET is not an
> acceptable alternative because every other application uses
> Ctrl+Shift+U and I want consistency across my desktop.)

What kind of GTK Emacs is this?

If this is the X build, then:

If you want to use X input methods, do _not_ use the GTK XIM module.
Emacs has built-in support for them that generally works better.

If you want some other input module, set `x-gtk-native-input' to a
non-nil value.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]