Subject: Re: bug#43830: keyboard layout handling incompatible with rest of the OS

From: Paul Pogonyshev <[email-masked]>
Date: Tue, 6 Oct 2020 23:05:20 +0200

> When your X xkb layout has some differences from an Emacs input method,
> you need to adjust these mismatched keys, but this is not a big problem.

It doesn't. With switching Emacs input methods between English and Russian
I also get English '/' == Russian '.'. And so C-. in Russian input method
works
as C-/ in English, because it's the same physical key.

> Hack or not, but it works fine for many users (the git repo has 57 stars).

Yeah, one of those is mine. It doesn't work "fine", it works much better
than
nothing. But still not exactly fine. I rebound C-. as a workaround, because
anyway it has no standard binding. But I cannot do the same for M-. for
example.

Also, the same goes for many S-M-[digit] combinations, because characters
on the digit row are often different in Russian layout. For example, S-M-6
in
English layout translates to M-^, `delete-indentation', but in Russian S-M-6
becomes M-:, `eval-expression'. And so on.

So, it is a good workaround that *mostly* works. But it doesn't solve the
underlying issue. Which was successfully solved by other applications tens
of years ago.

Paul

On Tue, 6 Oct 2020 at 22:37, Juri Linkov <[email-masked]> wrote:

> >> You can use the package https://github.com/a13/reverse-im.el
> >
> > Mostly works fine, but e.g. C-. in Russian doesn't work as C-/ (undo) for
> > me
> > (in Russian layout '.' is on the same key as '/' in English).
>
> When your X xkb layout has some differences from an Emacs input method,
> you need to adjust these mismatched keys, but this is not a big problem.
>
> > Pretty sure the correct way would be for Emacs to support this natively,
> > not hack from Elisp side, which has no information about physical keys,
> > only typed characters.
>
> Hack or not, but it works fine for many users (the git repo has 57 stars).
>