Eli Zaretskii | 29 Jun 19:42
Picon

Re: Control-key binding while typing (for example) Hebrew

> Date: Mon, 28 Jun 2010 23:18:27 +0300
> From: Amit Ramon <amit.ramon <at> gmail.com>
> 
> However, if one uses a non-standard keyboard this assumption is
> broken. The 5th key on the first row might send some other key, not a
> `b', which, if you don't tell Emacs about the layout, will be translated
> to some other letter, not Nun.
> 
> The way to tell Emacs about the layout of the keyboard is by defining
> it and adding it to quail-keyboard-layout-alist, then set it as the
> current layout using quail-set-keyboard-layout. You can see this in
> the sample code that Kenichi Handa sent.

This assumes that the location of Hebrew letters on the Dvorak
keyboard is exactly the same as on the standard keyboard.  But that
assumption is not necessarily true.  There's no "standard" for Hebrew
Dvorak keyboard.  At least this page:

  http://ramalokehrota.blogspot.com/2007/04/russian-and-hebrew-dvorak-for-x11.html

advertises a Dvorak-based layout which moves the Hebrew letters
together with the English ones.  E.g., SHIN is still on the same key
as A, LAMED is on K, etc.  For this layout, I understand that the
Hebrew input method that comes with Emacs out of the box will work
without any changes.
Yair F | 29 Jun 21:28
Picon

Re: Control-key binding while typing (for example) Hebrew

I am sorry I missed this conversation.
Maybe I am confused, but it seems to me that there are two issues here
that are linked but separated.

Currently there are two ways to input a language into emacs: The first
is "Native" in which the underlying Window system/Terminal is
responsible for emittting codes from the keyboard combinations and
other means. These input methods are shared among all applications
running on the computer.

The second way is unique to Emacs and is using the leim/quail
environment. This would probably be used on system where native IM are
not available, or don't supply all necessary input e.g. Hebrew
cantillation marks.

As far as I understand leim/quail are considered optional parts of
Emacs and it is possible to build Emacs without them.
If any of you have comments on the usage of any of the input methods I
created, please let me know and I'll try to improve them. It would
help me a lot if the message's subject will state that clearly.

The second issue is how Emacs behaves when Native input methods are
handeled on Emacs.
Modifier keys were long ago a mark of Emacs
(Escape-Meta-Alt-Control-Super). and are essential to the use of it.

When native IM is enabled Emacs interprets the modifier as modifying
the IM character and not the underlying key. Thus we get C-ב, A-ב and
s-ב, however not S-ב.
This is most uncomfortable as one cannot expect Emacs user to rebind
(Continue reading)

Eli Zaretskii | 29 Jun 23:11
Picon

Re: Control-key binding while typing (for example) Hebrew

> Date: Tue, 29 Jun 2010 22:28:24 +0300
> From: Yair F <yair.f.lists <at> gmail.com>
> Cc: Amit Ramon <amit.ramon <at> gmail.com>, emacs-bidi <at> gnu.org
> 
> Currently there are two ways to input a language into emacs: The first
> is "Native" in which the underlying Window system/Terminal is
> responsible for emittting codes from the keyboard combinations and
> other means. These input methods are shared among all applications
> running on the computer.

Not that it matters, but just for the record: on MS-Windows, switching
the keyboard input language only affects the application whose window
has focus when you switch the language.  All the other applications
are not affected, and still get the same input they did before.
Windows automatically sets the keyboard input language when you move
focus to a different application window.

> As far as I understand leim/quail are considered optional parts of
> Emacs

Not since Emacs 22.  You can, of course, remove the leim subdirectory
and build without it, but other than that, it comes as part of the
release tarball, and is built and installed by default.

> When native IM is enabled Emacs interprets the modifier as modifying
> the IM character and not the underlying key. Thus we get C-ב, A-ב and
> s-ב, however not S-ב.

Not on MS-Windows, at least not on my XP SP2 box.  There, when the
keyboard is switched to Hebrew and I type C-ב, Emacs gets C-c.  In
(Continue reading)

Amit Aronovitch | 29 Jun 23:41
Picon

Re: Control-key binding while typing (for example) Hebrew


On Wed, Jun 30, 2010 at 12:11 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:

> When native IM is enabled Emacs interprets the modifier as modifying
> the IM character and not the underlying key. Thus we get C-ב, A-ב and
> s-ב, however not S-ב.

Not on MS-Windows, at least not on my XP SP2 box.  There, when the
keyboard is switched to Hebrew and I type C-ב, Emacs gets C-c.  In
fact, I couldn't find a way to produce C-ב etc. on MS-Windows, not
even with "C-x <at> c".
 
> This problem is not bidi-related, or Hebrew specific. I've seen that
> on Russian keyboard layout as well. It is not Windows-System specific
> as MS Windows also show this problem.

Well, on MS-Windows it doesn't happen, see above.  But I like using
Leim anyway, mainly because it's available and works the same on every
platform I work on, and I don't need to install any keyboard drivers
etc. to get input in some language.

But you should still have a partial version of the problem: e.g. when you type "C-x o", you'd get "C-x ם" (that's a MEM not an Oh), and that would probably be unbound.


> Once bidi would be available to the public, this would be rather acute problem.

??? You yourself say (correctly) above that this problem is not
specific to bidi or any language.  So this problem, however acute it
is, as already here.  Am I missing something?


True, it is certainly here.
It is most acute in your "workhorse" apps (where you tend to use keyboard shortcuts rather than toolbar buttons and menus).
In my case it happens in Firefox, which is quite annoying (not in google chrome though - maybe the hebrew translators also defined new shortcuts). In emacs it would be far worse, as I use it intensively, and heavily rely on keyboard shortcuts (but until now I hardly ever used Hebrew in emacs).
Conclusion : not exclusively our problem, but it would be best if we could solve it for Emacs.

  AA
_______________________________________________
emacs-bidi mailing list
emacs-bidi <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-bidi
Amit Ramon | 29 Jun 23:20
Picon

Re: Control-key binding while typing (for example) Hebrew

Eli Zaretskii <eliz <at> gnu.org> [2010-06-29 20:42 +0300]:

>> Date: Mon, 28 Jun 2010 23:18:27 +0300
>> From: Amit Ramon <amit.ramon <at> gmail.com>
>>
>> However, if one uses a non-standard keyboard this assumption is
>> broken. The 5th key on the first row might send some other key, not a
>> `b', which, if you don't tell Emacs about the layout, will be translated
>> to some other letter, not Nun.
>>
>> The way to tell Emacs about the layout of the keyboard is by defining
>> it and adding it to quail-keyboard-layout-alist, then set it as the
>> current layout using quail-set-keyboard-layout. You can see this in
>> the sample code that Kenichi Handa sent.
>
>This assumes that the location of Hebrew letters on the Dvorak
>keyboard is exactly the same as on the standard keyboard.  But that
>assumption is not necessarily true.  There's no "standard" for Hebrew
>Dvorak keyboard.  

There is a confusion here - perhaps I wasn't clear. I'll try again.

Whenever in this thread I talked about a Dvorak layout I was talking
about the layout for an _English_ keyboard. The Hebrew layout I'm
talking about is always the same, and is what we are all familiar
with. Again, I wasn't talking of a Hebrew Dvorak layout.

The whole discussion here is about these 2 use cases:

1. A qwerty English keyboard. The first 4 keys in the middle row are,
from left to right are asdf

2. A Dvorak English keyboard. The first 4 keys in the middle row are,
from left to right are aoeu

When I (somehow) switch to Hebrew, in _both_ keyboards I expect these
4 keys to be Shin, Dalet, Gimel, Kaf - ALWAYS. This is what I always
expect to get from a Hebrew keyboard, no matter what is the layout of
the English keys. Now if you use an input method that receives English
characters and translates them to Hebrew ones, it needs to know the
English layout.

Maybe this wasn't clear, but these are the basic assumptions. I
believe that now my previous posts will make sense, but I'd be happy
to explain the whole thing again if asked.

>At least this page:
>
>http://ramalokehrota.blogspot.com/2007/04/russian-and-hebrew-dvorak-for-x11.html
>
>advertises a Dvorak-based layout which moves the Hebrew letters
>together with the English ones.  E.g., SHIN is still on the same key
>as A, LAMED is on K, etc.  For this layout, I understand that the
>Hebrew input method that comes with Emacs out of the box will work
>without any changes.

And a side comment about the link that you mentioned that talks about
a "Hebrew Dvorak layout": I have seen it a long time ago while I was
interested in designing a Hebrew Dvorak layout. The example there is a
wrong interpretation of the concept of Dvorak layout. And you are
right - there isn't a standard for Hebrew, all my searches manage to
find just one person who was using a - home-made - Dvorak layout ;-)
Then I created one for myself, but haven't had the time to really
try to use it...

--- Amit
Amit Aronovitch | 30 Jun 00:21
Picon

Re: Control-key binding while typing (for example) Hebrew


On Tue, Jun 29, 2010 at 8:42 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> Date: Mon, 28 Jun 2010 23:18:27 +0300
> From: Amit Ramon <amit.ramon <at> gmail.com>
>
> However, if one uses a non-standard keyboard this assumption is
> broken. The 5th key on the first row might send some other key, not a
> `b', which, if you don't tell Emacs about the layout, will be translated
> to some other letter, not Nun.
>
> The way to tell Emacs about the layout of the keyboard is by defining
> it and adding it to quail-keyboard-layout-alist, then set it as the
> current layout using quail-set-keyboard-layout. You can see this in
> the sample code that Kenichi Handa sent.

This assumes that the location of Hebrew letters on the Dvorak
keyboard is exactly the same as on the standard keyboard.  But that
assumption is not necessarily true.  There's no "standard" for Hebrew
Dvorak keyboard.  At least this page:

 http://ramalokehrota.blogspot.com/2007/04/russian-and-hebrew-dvorak-for-x11.html
 
advertises a Dvorak-based layout which moves the Hebrew letters
together with the English ones.  E.g., SHIN is still on the same key
as A, LAMED is on K, etc.  For this layout, I understand that the
Hebrew input method that comes with Emacs out of the box will work
without any changes.


A very interesting example. I actually went to read the defs, to verify this is really what they do, because initially I could not think of any reason why anyone would actually want to do such a thing...

Next, I noticed he also has a "phonetic Hebrew" keyboard there, and something clicked into place...
Back in the 80's, when I first started typing Hebrew (on the commodore 64 I believe), I was already quite fluent with the qwerty keyboard, but the Hebrew layout was a new thing for me (and I also did not have stickers for the keys). Soon enough I found myself memorizing the (quite random) translation-table (a=ש, s=ד, d=ג...).
This layout might be useful for someone fluent in qwerty, who tries to switch to Dvorak while still in the "learning phase" of the Hebrew layout.

Nevertheless, nowadays, native Hebrew speakers learn to type (with Hebrew layout) before they learn English, so this scenario should be very rare. When you switch to Dvorak, you normally do that to improve your English typing. You do *not* expect the Hebrew positions to change (and if you did, you'd probably want them moved to Hebrew-specific human-engineered positions, not the effectively random ones caused by this shuffling). Hence, the assumptions made by Amit (Hebrew keys should remain in the same position) are far more useful (at least they correspond to what I'd expect).

    AA

_______________________________________________
emacs-bidi mailing list
emacs-bidi <at> gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-bidi
Kenichi Handa | 30 Jun 07:19

Re: Control-key binding while typing (for example) Hebrew

In article <83bpatbuqk.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> writes:

> This assumes that the location of Hebrew letters on the Dvorak
> keyboard is exactly the same as on the standard keyboard.

Yes.  And the current definition of "Hebrew" input method
assumes it by having KBD-TRANSLATE argument t.

> But that
> assumption is not necessarily true.  There's no "standard" for Hebrew
> Dvorak keyboard.  At least this page:

>   http://ramalokehrota.blogspot.com/2007/04/russian-and-hebrew-dvorak-for-x11.html

> advertises a Dvorak-based layout which moves the Hebrew letters
> together with the English ones.  E.g., SHIN is still on the same key
> as A, LAMED is on K, etc.  For this layout, I understand that the
> Hebrew input method that comes with Emacs out of the box will work
> without any changes.

Dvorak keyboard layout was invented for more rapid/efficient
English typing than qwerty keyboard.  So, if there's "Hebrew
Dvorak" keyboard, it should also be designed by considering
rapid/efficient typing in the same way as English Dvorak
keyboard (i.e. the most frequently used keys are aligned at
the middle line, etc).  Otherwize, what's the merit of
having another layout for Hebrew?

---
Kenichi Handa
handa <at> m17n.org

Gmane