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: Sun, 01 Nov 2009 05:24:44 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Eli Zaretskii wrote:

OK, but knowing whether to mirror or not requires information about
whether a given keyboard already mirrors characters.  Can this be
found somewhere, or queried at run time?

[Only if you want to do it automatically, if it was a user preference the user would just be setting ltr and rtl current input methods as desired? Or maybe it would be more intuitive to use just one input method, e.g. hebrew-parenjuggle, expanding the input method layer to support rtl/ltr context sensitive definitions for individual rules]

It is possible to find out if the current os keyboard layout is us or hebrew or whatever which could be coupled with prior information that it is standard for certain layouts to mirror. I don't know exhaustively which ones do, though a lot could probably be extracted by inspection of the xkb database.

If OTOH you wanted to find out whether the code a keypress returns under the current os layout actually corresponds to the glyph printed on the keyboard, you can't really - Only the user knows that at present as current keyboards don't really inform the computer what glyphs they have physically printed on them AFAIK (though it would certainly be technically feasible for a keyboard to e.g. say "Hi, I am physically a standard british qwerty 105 key keyboard" to a computer with some well-defined wire protocol, I don't think typical PC ones do).





reply via email to

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