Re: Control-key binding while typing (for example) Hebrew
Amit Ramon <[email protected]> Fri, 25 Jun 2010 23:44:36 +0300
| Newsgroups | gmane.emacs.bidi |
|---|---|
| Message-ID | <[email protected]> |
Eli Zaretskii <[email protected]> [2010-06-25 18:31 +0300]: >> >> This is a feature, not a bug. The point is that, AFAIK, Emacs input >> method is simply a translation from one character to another. So, for >> example, when Emacs receives a 'x' character it is translated to >> Hebrew Samekh. However, the location of the button that sends 'x' >> depends on the keyboard layout, so the location of the key that will >> send Hebrew Samekh also depend on the layout. > >I don't think so. I think the Emacs translates a character regardless >of which key produced it. I agree - but this is exactly the problem! Lets try an example, perhaps I wasn't clear enough. Assume you are typing in Hebrew. When you want to produce the letter ALEF, you press the keyboard key that is right under the 5-key, and on a standard (QWERTY) keyboard is used to produce the letter t. If you look at hebrew.el you'll see that indeed t is mapped to ALEF. The mapping is based on the character, not on the location of the key that produces it - exactly as you said. Now assume that your basic keyboard layout is DVORAK (this is, for example, what I use). If you're using the same hebrew.el, t is still mapped to ALEF - but the key that produces t is not under the 5-key anymore. It is the key that on a QWERTY keyboard is marked k. So now ALEF is produced by this key. The key that is under the 5-key now (DVORAK) produces y. hebrew.el maps y to TET, so if you are using DVORAK as your main English layout, and you are using the standard hebrew.el, and you (naively) want to insert ALEF, this is what happens: you press the key under the 5-key - this is where the ALEF is supposed to be, right? the X window system sends 'y' to Emacs. Emacs uses the input method in hebrew.el to translate the character, and you end up with the 'y' translated to TET - you got TET where you were expecting to get ALEF. I hope I managed to make it clearer. > Take a look at leim/quail/hebrew.el: all it >tells Emacs is the characters to translate. There's no information >there regarding the layout of the keyboard. > This is true, I referred to it above. >Perhaps Handa-san could tell if this is true. Lets see what he says. Best, Amit