[Top][All Lists]

[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 16:58:45 +0000
User-agent: Mozilla-Thunderbird (X11/20090701)

Eli Zaretskii wrote:

I'm asking because, in bidirectional editing, characters that are
mirrored at display time need to be mirrored at keyboard input time.
For example, when typing right-to-left text, the character `)' should
be mirrored so that what ends up in the buffer is `(', because what
the user means is to produce an open parenthesis.  (Displaying this
text will then mirror again, and display `)'; this last part already
works in the bidi Emacs I'm working on).

Do you? I'm not really knowledgeable about RtL, but reason I ask is because when I switch on an arabic OS-level keyboard layout, Shift-9 actually generates a ) parenright keysym and shift-0 a ( parenleft, which I think is then displayed mirrored as per the last bit of your post in RtL contexts.


You can see the transposition in /usr/share/X11/xkb/symbols on
typical gnu+linux distros

So the right place to do such keyboard mirroring intra-emacs might be in quail, i.e. for when people are trying to work RtL only intra-emacs
still with a western os-level keymap.
And indeed, the transposition is shown in the commentary in
emacs/leim/quail/arabic.el  ,
though I think it's missing from the actual map at present
(possibly because emacs lacks RtL until you're done!)

So, since one can assume either the OS keymap or quail will be pre-mirrroing in practice, you probably don't need to distinguish
keyboard vs. paste here.

N.B. I could be quite wrong here, not expert by any means.

reply via email to

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