[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: not quite understanding input methods
From: |
Maxim Nikulin |
Subject: |
Re: not quite understanding input methods |
Date: |
Thu, 2 Sep 2021 19:00:16 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 01/09/2021 14:43, Yuri Khan wrote:
My point (which some will find offensive) is that maybe one doesn’t
need to implement input methods in Emacs.
I like the idea to avoid input methods in Emacs and to switch keyboard
layouts using XKB as in other applications when keycodes may be directly
mapped to symbols. Unfortunately Emacs keymaps use current keyboard
layout, not base one. E.g. when Russian layout active, key symbols for
US locale should be checked. It is terribly inconvenient to switch
layout before each shortcut. Control + Cyrillic S does not act as C-c
despite it is the same key. That is why switching layouts outside of
Emacs still leads to more inconvenience than input methods in Emacs.
It was discussed earlier: Keybindings in non-Latin layout
https://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00031.html
Side note: some iBus input methods have quick way to disable input
method, e.g. pressing and releasing Shift.
~15 years ago more Gtk applications suffered from a similar problem that
Ctrl+C required namely Latin C, not Cyrillic S. Nowadays I can not name
application where Ctrl is broken. For Alt+something the issue is that
"something" is locale-dependent and may require switching to RU layout.
As to emacs, minor inconvenience: default layout switch Win+Space aka
s-SPC aborts incremental search, so customization of key bindings is
required. Other issues are significantly harder to overcome.
There is reverse-im package that can translate RU symbols back to US
ones. Unfortunately it does not work with keystrokes like M-$ or C-c C-,
(`org-insert-structure-template')
(quail-define-package "russian-computer" ; ...
(quail-define-rules ; ...
("," ?б) ; ...
("$" ?\;) ; ...
("?" ?,))
For shortcuts "," should be associated for particular physical key
independently of active layout.
So it is necessary to ensure at the desktop level that keyboard layout
is (almost) never switched for Emacs windows. Preferably the same
shortcuts for layout switching should work for all applications, Emacs
should not be an exception.
I have managed to achieve setup that *mostly* works. CapsLock and
Shift+CapsLock select assigned layouts in Emacs and other applications,
US layout is forced for Emacs windows. On the other hand I consider it
too complex and hardly can recommend it since it is not really robust
and has some drawbacks.
- Re: not quite understanding input methods, (continued)
- Re: not quite understanding input methods, Yuri Khan, 2021/09/01
- Re: not quite understanding input methods, Eli Zaretskii, 2021/09/01
- Re: not quite understanding input methods, João Távora, 2021/09/01
- Re: not quite understanding input methods, André A . Gomes, 2021/09/01
- Re: not quite understanding input methods, João Távora, 2021/09/01
- Re: not quite understanding input methods, André A . Gomes, 2021/09/01
- Re: not quite understanding input methods, Perry E. Metzger, 2021/09/01
- Re: not quite understanding input methods,
Maxim Nikulin <=
- Re: not quite understanding input methods, Filipp Gunbin, 2021/09/02
Re: not quite understanding input methods, Perry E. Metzger, 2021/09/01
Re: not quite understanding input methods, Perry E. Metzger, 2021/09/01