Re: How to recognize keyboard insertion?

From:

Eli Zaretskii

Subject:

Re: How to recognize keyboard insertion?

Date:

Sat, 31 Oct 2009 23:23:07 +0200

> Date: Sat, 31 Oct 2009 20:42:48 +0000
> From: David De La Harpe Golden <address@hidden>
> CC: address@hidden
>
> Maybe one way to handle it would be to make an (emacs level) input
> method autoswitcher, that swaps emacs input methods as the rtl/ltr
> context switches with point movement. i.e. allow (but don't require)
> rtl and ltr contexts to have different emacs input methods.
We can have input methods switched on and off depending on surrounding
characters, but how will this solve the problem that different methods
of inputting the same character behave differently with mirrored
characters? A user can conceptually type a character either via an
Emacs input method or via the OS keyboard, in the same place, can't
she?
> Then there could be variant emacs input methods with various
> transpositions suitable for use with various os-level keymaps.
Are you saying that Emacs should have a way of knowing which OS-level
keyboard layout (or keyboard language, in Windows parlance) was used
to insert the character? If so, how to do that?
Or are you saying that switching on a suitable input method, depending
on surrounding characters, will eliminate the need to know how the
character was inserted? If so, please explain why you think so,
because I don't follow.
> And you don't have to be able to _record_ whether an inserted
> character came from the keyboard.
I don't need to record that, I just need to know that when the
character is inserted. After it's inserted, this information is not
needed anymore, because display-time mirroring has enough information
to DTRT.