emacs-devel
[Top][All Lists]
Advanced

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

Re: How to recognize keyboard insertion?


From: David De La Harpe Golden
Subject: Re: How to recognize keyboard insertion?
Date: Sat, 31 Oct 2009 21:49:20 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Eli Zaretskii wrote:


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?


Not as such (though asking the os what the current keyboard layout is should be possible on any reasonable os via the platform analog of XkbGetKeyboard() ?)

- A user with a hebrew os keyboard layout who liked auto-switching could define that in an ltr context, an emacs input method revpar* should be switched to. That input method would yield "(" when the os sends ")" to emacs. A user with a us os keyboard layout who wanted to use the hebrew emacs input method and also auto-switch could use "hebrew" and "hebrew-revpar" rtl and ltr input methods.

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.

Because it would always insert the appropriate character?



*
(require quail)
(quail-define-package
 "revpar" "revpar" ")(" t
 "transpose inserted parens"
 nil nil nil nil nil nil nil nil nil nil t)
(quail-define-rules
 ("(" ?\))
 (")" ?\())




reply via email to

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