unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Right Alt/Meta keys on Windows systems
@ 2005-12-28 15:41 Paul Michael Reilly
  2005-12-28 17:27 ` Lennart Borgman
  2005-12-28 19:13 ` Eli Zaretskii
  0 siblings, 2 replies; 36+ messages in thread
From: Paul Michael Reilly @ 2005-12-28 15:41 UTC (permalink / raw)


I currently find myself having to use Windows/XP for a short while.
My first action was to install cygwin and rebuild the latest CVS Emacs
snapshot.  Much to my chagrin, it would appear that the ancient
Windows right Alt/Meta key problem still exists (the right Alt key is
NOT a Meta modifier key as is the left one).  I searched the devel
archives and it would appear that either I missed the solution or it
is still an unsolved problem.  Is it possible that there is still no
easy solution (editing the registry does not qualify as an easy
solution, IMHO)?  If so, could someone please state or provide a
reference to the issues so I can decide which of the problem or the
cure is the more painful to me.

Thanks,

-pmr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 15:41 Right Alt/Meta keys on Windows systems Paul Michael Reilly
@ 2005-12-28 17:27 ` Lennart Borgman
  2005-12-28 19:14   ` Eli Zaretskii
  2005-12-28 19:13 ` Eli Zaretskii
  1 sibling, 1 reply; 36+ messages in thread
From: Lennart Borgman @ 2005-12-28 17:27 UTC (permalink / raw)
  Cc: emacs-devel

Paul Michael Reilly wrote:

>I currently find myself having to use Windows/XP for a short while.
>My first action was to install cygwin and rebuild the latest CVS Emacs
>snapshot.  Much to my chagrin, it would appear that the ancient
>Windows right Alt/Meta key problem still exists (the right Alt key is
>NOT a Meta modifier key as is the left one).  I searched the devel
>archives and it would appear that either I missed the solution or it
>is still an unsolved problem.  Is it possible that there is still no
>easy solution (editing the registry does not qualify as an easy
>solution, IMHO)?  If so, could someone please state or provide a
>reference to the issues so I can decide which of the problem or the
>cure is the more painful to me.
>  
>
The problem is still there. I proposed a solution quite a while ago but 
it was decided that it was too close to next release of Emacs. In the 
mean time I have a patch for this which I and I believe others have been 
using since this summer. Go to

    http://ourcomments.org/Emacs/EmacsW32.html

to find out more about my patch. You can find binaries there with and 
without this patch. Last patched version is from 2005-12-18 (there is 
actually one from 12-25 too I believe but I have not had time to move it 
to its final location yet).

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 15:41 Right Alt/Meta keys on Windows systems Paul Michael Reilly
  2005-12-28 17:27 ` Lennart Borgman
@ 2005-12-28 19:13 ` Eli Zaretskii
  2005-12-28 19:55   ` Paul Pogonyshev
  1 sibling, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-28 19:13 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Wed, 28 Dec 2005 10:41:33 -0500
> From: Paul Michael Reilly <pmr@pajato.com>
> 
> Much to my chagrin, it would appear that the ancient Windows right
> Alt/Meta key problem still exists (the right Alt key is NOT a Meta
> modifier key as is the left one).

Right Alt key does produce META for me, so it might be something
specific to your system's setup or maybe to your locale.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 17:27 ` Lennart Borgman
@ 2005-12-28 19:14   ` Eli Zaretskii
  2005-12-28 19:55     ` Lennart Borgman
  0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-28 19:14 UTC (permalink / raw)
  Cc: pmr, emacs-devel

> Date: Wed, 28 Dec 2005 18:27:00 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> Cc: emacs-devel@gnu.org
> 
> The problem is still there. I proposed a solution quite a while ago but 
> it was decided that it was too close to next release of Emacs. In the 
> mean time I have a patch for this which I and I believe others have been 
> using since this summer. Go to
> 
>     http://ourcomments.org/Emacs/EmacsW32.html
> 
> to find out more about my patch. You can find binaries there with and 
> without this patch. Last patched version is from 2005-12-18 (there is 
> actually one from 12-25 too I believe but I have not had time to move it 
> to its final location yet).

Isn't it true that your patches referred to the lwindow key, not to
Alt?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 19:14   ` Eli Zaretskii
@ 2005-12-28 19:55     ` Lennart Borgman
  0 siblings, 0 replies; 36+ messages in thread
From: Lennart Borgman @ 2005-12-28 19:55 UTC (permalink / raw)
  Cc: pmr, emacs-devel

Eli Zaretskii wrote:

>>Date: Wed, 28 Dec 2005 18:27:00 +0100
>>From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>Cc: emacs-devel@gnu.org
>>
>>The problem is still there. I proposed a solution quite a while ago but 
>>it was decided that it was too close to next release of Emacs. In the 
>>mean time I have a patch for this which I and I believe others have been 
>>using since this summer. Go to
>>
>>    http://ourcomments.org/Emacs/EmacsW32.html
>>
>>to find out more about my patch. You can find binaries there with and 
>>without this patch. Last patched version is from 2005-12-18 (there is 
>>actually one from 12-25 too I believe but I have not had time to move it 
>>to its final location yet).
>>    
>>
>
>Isn't it true that your patches referred to the lwindow key, not to
>Alt?
>  
>
Oops... - sorry, you are right!  My patch allows the use of the left and 
right windows keys as META. This leaves Alt to the menus as in other w32 
appls.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 19:13 ` Eli Zaretskii
@ 2005-12-28 19:55   ` Paul Pogonyshev
  2005-12-28 20:15     ` Eli Zaretskii
  0 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-28 19:55 UTC (permalink / raw)
  Cc: pmr

Eli Zaretskii wrote:
> > Date: Wed, 28 Dec 2005 10:41:33 -0500
> > From: Paul Michael Reilly <pmr@pajato.com>
> > 
> > Much to my chagrin, it would appear that the ancient Windows right
> > Alt/Meta key problem still exists (the right Alt key is NOT a Meta
> > modifier key as is the left one).
> 
> Right Alt key does produce META for me, so it might be something
> specific to your system's setup or maybe to your locale.

I think it is related to the issue I raised under topic `wish: right alt/meta
to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
layout switcher and so it does not look as Alt to applications.

I strongly believe Emacs must not do anything about it.  Quite the opposite:
it should properly handle Mode_switch on GNU/Linux etc. with X, so that it
disables LEIM layout while it pressed.  This way Emacs would be consistent
with the rest of the system.  If Windows lacks a way to disable this feature
and make right Alt work the same way as left Alt, it's a problem of Windows,
not of Emacs.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 19:55   ` Paul Pogonyshev
@ 2005-12-28 20:15     ` Eli Zaretskii
  2005-12-28 20:31       ` Paul Pogonyshev
  0 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-28 20:15 UTC (permalink / raw)
  Cc: pmr, emacs-devel

> From: Paul Pogonyshev <pogonyshev@gmx.net>
> Date: Wed, 28 Dec 2005 21:55:21 +0200
> Cc: pmr@pajato.com
> 
> I think it is related to the issue I raised under topic `wish: right alt/meta
> to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
> layout switcher and so it does not look as Alt to applications.

Sorry, I'm not following: are you talking about keyboard language
switch invoked on MS-Windows with the Alt-SPC combination?  If so,
then the keyboard switch works for me as I'd expect (i.e., the same as
it does in other Windows applications), and it doesn't affect the
right Alt to META mapping in any way.

> I strongly believe Emacs must not do anything about it.  Quite the opposite:
> it should properly handle Mode_switch on GNU/Linux etc. with X, so that it
> disables LEIM layout while it pressed.

Are we still talking about the MS-Windows port of Emacs?  Or are we
talking about Emacs on GNU/Linux?  The OP raised the issue for
Windows.

> If Windows lacks a way to disable this feature and make right Alt
> work the same way as left Alt, it's a problem of Windows, not of
> Emacs.

As I said, right and left Alt keys work the same for me on MS-Windows.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 20:15     ` Eli Zaretskii
@ 2005-12-28 20:31       ` Paul Pogonyshev
  2005-12-28 20:54         ` Lennart Borgman
                           ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-28 20:31 UTC (permalink / raw)
  Cc: pmr

Eli Zaretskii wrote:
> > From: Paul Pogonyshev <pogonyshev@gmx.net>
> > Date: Wed, 28 Dec 2005 21:55:21 +0200
> > Cc: pmr@pajato.com
> > 
> > I think it is related to the issue I raised under topic `wish: right alt/meta
> > to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
> > layout switcher and so it does not look as Alt to applications.
> 
> Sorry, I'm not following: are you talking about keyboard language
> switch invoked on MS-Windows with the Alt-SPC combination?  If so,
> then the keyboard switch works for me as I'd expect (i.e., the same as
> it does in other Windows applications), and it doesn't affect the
> right Alt to META mapping in any way.

Well, you should have probably re-read that thread's opening message.  I'm
talking about a common function of right Alt key: it temporary (while pressed)
disables the current layout and switches to English layout.  I guess _that's_
why right Alt doesn't work as Alt in Emacs for Lennart Borgman.  I don't really
know, though.

> > I strongly believe Emacs must not do anything about it.  Quite the opposite:
> > it should properly handle Mode_switch on GNU/Linux etc. with X, so that it
> > disables LEIM layout while it pressed.
> 
> Are we still talking about the MS-Windows port of Emacs?  Or are we
> talking about Emacs on GNU/Linux?  The OP raised the issue for
> Windows.

Now I'm talking about GNU/Linux, where Emacs is working incosistently with
the rest of the system.  It disregards Mode_switch (i.e. right Alt when
working in the layout-disabling mode I described above) when working with
LEIM.  E.g., in Gaim, while using the Russian layout, I can type [right alt]-ъ
to type the closing bracket, because Russian letter `ъ' is on the same key
as the closing bracket in the English layout.  In Emacs, typing [right alt]-ъ
still produces `ъ'.

> > If Windows lacks a way to disable this feature and make right Alt
> > work the same way as left Alt, it's a problem of Windows, not of
> > Emacs.
> 
> As I said, right and left Alt keys work the same for me on MS-Windows.

That's OK, but they don't work the same for Lennart, right?  I'm arguing,
that since it is system setting, Emacs shouldn't override it.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 20:31       ` Paul Pogonyshev
@ 2005-12-28 20:54         ` Lennart Borgman
  2005-12-30  8:54           ` Mathias Dahl
  2005-12-29  0:00         ` Paul Michael Reilly
  2005-12-29  4:29         ` Eli Zaretskii
  2 siblings, 1 reply; 36+ messages in thread
From: Lennart Borgman @ 2005-12-28 20:54 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, emacs-devel

Paul Pogonyshev wrote:

>That's OK, but they don't work the same for Lennart, right?  I'm arguing,
>that since it is system setting, Emacs shouldn't override it.
>  
>
I apologies for any confusion I have added here when I tried to answer. 
My concern was with using the left Alt key for the menus in Emacs and 
instead use the left and right Windows keys for META in Emacs. I have no 
problem with the right Alt key (AltGr).

My patches allows the usage I told above. This way Alt is used the way 
it usually is used on w32. Using the menus is otherwise a pain. But 
instead I sacrifice the use of the left and right Windows keys. For me 
this is far better since I use the menus much more often when the 
Windows keys. (In fact I never use the left and right windows keys - 
except in Emacs. I use Ctrl-Esc instead.)

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 20:31       ` Paul Pogonyshev
  2005-12-28 20:54         ` Lennart Borgman
@ 2005-12-29  0:00         ` Paul Michael Reilly
  2005-12-29  0:07           ` Lennart Borgman
  2005-12-29  4:45           ` Eli Zaretskii
  2005-12-29  4:29         ` Eli Zaretskii
  2 siblings, 2 replies; 36+ messages in thread
From: Paul Michael Reilly @ 2005-12-29  0:00 UTC (permalink / raw)
  Cc: eliz, emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:

 > MIME-Version: 1.0
 > Content-Disposition: inline
 > 
 > Eli Zaretskii wrote:
 > > > From: Paul Pogonyshev <pogonyshev@gmx.net>
 > > > Date: Wed, 28 Dec 2005 21:55:21 +0200
 > > > Cc: pmr@pajato.com
 > > > 
 > > > I think it is related to the issue I raised under topic `wish: right alt/meta
 > > > to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
 > > > layout switcher and so it does not look as Alt to applications.
 > > 
 > > Sorry, I'm not following: are you talking about keyboard language
 > > switch invoked on MS-Windows with the Alt-SPC combination?  If so,
 > > then the keyboard switch works for me as I'd expect (i.e., the same as
 > > it does in other Windows applications), and it doesn't affect the
 > > right Alt to META mapping in any way.
 > 
 > Well, you should have probably re-read that thread's opening message.  I'm
 > talking about a common function of right Alt key: it temporary (while pressed)
 > disables the current layout and switches to English layout.  I guess _that's_
 > why right Alt doesn't work as Alt in Emacs for Lennart Borgman.  I don't really
 > know, though.
 > 
 > > > I strongly believe Emacs must not do anything about it.  Quite the opposite:
 > > > it should properly handle Mode_switch on GNU/Linux etc. with X, so that it
 > > > disables LEIM layout while it pressed.
 > > 
 > > Are we still talking about the MS-Windows port of Emacs?  Or are we
 > > talking about Emacs on GNU/Linux?  The OP raised the issue for
 > > Windows.
 > 
 > Now I'm talking about GNU/Linux, where Emacs is working incosistently with
 > the rest of the system.  It disregards Mode_switch (i.e. right Alt when
 > working in the layout-disabling mode I described above) when working with
 > LEIM.  E.g., in Gaim, while using the Russian layout, I can type [right alt]-ъ
 > to type the closing bracket, because Russian letter `ъ' is on the same key
 > as the closing bracket in the English layout.  In Emacs, typing [right alt]-ъ
 > still produces `ъ'.
 > 
 > > > If Windows lacks a way to disable this feature and make right Alt
 > > > work the same way as left Alt, it's a problem of Windows, not of
 > > > Emacs.
 > > 
 > > As I said, right and left Alt keys work the same for me on MS-Windows.
 > 
 > That's OK, but they don't work the same for Lennart, right?  I'm arguing,
 > that since it is system setting, Emacs shouldn't override it.

Sounds to me like Richard's intuition to punt on this issue before a
release was well placed.  It does not appear to be a simple issue.

Paul seems to be saying that the right Alt key has a compelling
function for some set of Users (temporary keyboard layout disable)
while another set of Users wants to use both Alt keys for symmetric
Meta modifier keys.  I suspect it is only a matter of time before some
Users belong to both sets.  Providing a solution for both will
probably be very messy.

Meanwhile I am very curious to know how Eli managed to get his system
to provide both left and right Meta modifiers from the Alt keys.  If
memory serves, when I last used Emacs on a Windows/2000/cygwin system,
I did not have this problem.  But a freshly installed Windows/XP
system on a Dell PC with a Logictech natural keyboard does exhibit the
behavior.  Windows/XP has a very complex Locale setting mechanism in
the control panel.  Perhaps this is where one needs to select a
different locale, but it is not at all intuitively obvious how to do
this such that the right Alt key will map to a Meta modifier.  Knowing
what locale settings Eli is using might help some.

Thanks,

-pmr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  0:00         ` Paul Michael Reilly
@ 2005-12-29  0:07           ` Lennart Borgman
  2005-12-29  4:45           ` Eli Zaretskii
  1 sibling, 0 replies; 36+ messages in thread
From: Lennart Borgman @ 2005-12-29  0:07 UTC (permalink / raw)
  Cc: eliz, emacs-devel, Paul Pogonyshev

Paul Michael Reilly wrote:

>Sounds to me like Richard's intuition to punt on this issue before a
>release was well placed.  It does not appear to be a simple issue.
>  
>
Sorry, seems like I have been adding to the confusion. The patches I 
have made to the w32 specific C code just allows the use of left and 
right Windows keys as Emacs META. They does not prevent anything. On top 
of that I built some elisp but that is another story.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 20:31       ` Paul Pogonyshev
  2005-12-28 20:54         ` Lennart Borgman
  2005-12-29  0:00         ` Paul Michael Reilly
@ 2005-12-29  4:29         ` Eli Zaretskii
  2005-12-29 19:10           ` Paul Pogonyshev
  2 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-29  4:29 UTC (permalink / raw)
  Cc: pmr, emacs-devel

> From: Paul Pogonyshev <pogonyshev@gmx.net>
> Date: Wed, 28 Dec 2005 22:31:19 +0200
> Cc: pmr@pajato.com
> 
> Eli Zaretskii wrote:
> > > From: Paul Pogonyshev <pogonyshev@gmx.net>
> > > Date: Wed, 28 Dec 2005 21:55:21 +0200
> > > Cc: pmr@pajato.com
> > > 
> > > I think it is related to the issue I raised under topic `wish: right alt/meta
> > > to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
> > > layout switcher and so it does not look as Alt to applications.
> > 
> > Sorry, I'm not following: are you talking about keyboard language
> > switch invoked on MS-Windows with the Alt-SPC combination?  If so,
> > then the keyboard switch works for me as I'd expect (i.e., the same as
> > it does in other Windows applications), and it doesn't affect the
> > right Alt to META mapping in any way.
> 
> Well, you should have probably re-read that thread's opening message.

You must be kidding: I replied to that opening message.  It says:

    I currently find myself having to use Windows/XP for a short while.
    My first action was to install cygwin and rebuild the latest CVS Emacs
    snapshot.  Much to my chagrin, it would appear that the ancient
    Windows right Alt/Meta key problem still exists (the right Alt key is
    NOT a Meta modifier key as is the left one).

There's nothing here about language switching, just about rge right
Alt key.

> I'm talking about a common function of right Alt key: it temporary
> (while pressed) disables the current layout and switches to English
> layout.

I don't see this on MS-Windows.  Is this supposed to work on Windows?
Note that the opening message clearly talks about Windows-related
issues.

> I guess _that's_ why right Alt doesn't work as Alt in Emacs for
> Lennart Borgman.

The opening message wasn't from Lennart, it was from Paul Michael
Reilly.

> > Are we still talking about the MS-Windows port of Emacs?  Or are we
> > talking about Emacs on GNU/Linux?  The OP raised the issue for
> > Windows.
> 
> Now I'm talking about GNU/Linux, where Emacs is working incosistently with
> the rest of the system.  It disregards Mode_switch (i.e. right Alt when
> working in the layout-disabling mode I described above) when working with
> LEIM.

That's another issue altogether, let's not add to confusion.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  0:00         ` Paul Michael Reilly
  2005-12-29  0:07           ` Lennart Borgman
@ 2005-12-29  4:45           ` Eli Zaretskii
  2005-12-29  6:08             ` Paul Michael Reilly
  1 sibling, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-29  4:45 UTC (permalink / raw)
  Cc: emacs-devel, pogonyshev

> Date: Wed, 28 Dec 2005 19:00:07 -0500
> From: Paul Michael Reilly <pmr@pajato.com>
> CC: emacs-devel@gnu.org, eliz@gnu.org
> 
> Paul seems to be saying that the right Alt key has a compelling
> function for some set of Users (temporary keyboard layout disable)

Paul was talking about GNU/Linux systems, not about MS-Windows.

> Meanwhile I am very curious to know how Eli managed to get his system
> to provide both left and right Meta modifiers from the Alt keys.  If
> memory serves, when I last used Emacs on a Windows/2000/cygwin system,
> I did not have this problem.  But a freshly installed Windows/XP
> system on a Dell PC with a Logictech natural keyboard does exhibit the
> behavior.  Windows/XP has a very complex Locale setting mechanism in
> the control panel.  Perhaps this is where one needs to select a
> different locale, but it is not at all intuitively obvious how to do
> this such that the right Alt key will map to a Meta modifier.  Knowing
> what locale settings Eli is using might help some.

Tell me what to look at on my machine and what to report, and I will
tell you what I have here.  (I simply do not know what information
defines the ``Windows locale''.)

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  4:45           ` Eli Zaretskii
@ 2005-12-29  6:08             ` Paul Michael Reilly
  2005-12-29 19:19               ` Paul Pogonyshev
                                 ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Paul Michael Reilly @ 2005-12-29  6:08 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

 > Reply-To: Eli Zaretskii <eliz@gnu.org>
 > 
 > > Date: Wed, 28 Dec 2005 19:00:07 -0500
 > > From: Paul Michael Reilly <pmr@pajato.com>
 > > CC: emacs-devel@gnu.org, eliz@gnu.org
 > > 
 > > Paul seems to be saying that the right Alt key has a compelling
 > > function for some set of Users (temporary keyboard layout disable)
 > 
 > Paul was talking about GNU/Linux systems, not about MS-Windows.

I understood him to be saying that his Windoze issue also should
apply to X-Windows.  His Windoze issue, as I interpret it, is about
the use of the right Alt key to temporarily force the keyboard into a
U.S. English locale so that a a key available in the U.S. English
locale but overridden in the other locale can be made available.
Suffice it to say that this is a related issue (to the use of right
Alt as a Meta modifier key) to the extent that there are two functions
that want to use the right Alt key.

There is even a larger issue here.  That being that Microsoft or any
other major player in the Windoze world can render some Emacs
convention (such as using the right Alt key as a Meta modifier)
obsolete, much to our chagrin.  This also applies to Lennort's use of
the left and right Windows keys (aka "alt option").  So again I tip my
hat to Richard for punting on this issue.  It deserves more discussion
and attention, both for the Alt keys and the Windows keys.  And to
make matters worse, I managed to scrounge around and dug up access to
a Windows/2000 system and, lo and behold, both Alt keys operated as
Meta modifier keys.  So my issue, so far, is a Windows/XP only issue.

My gut feel is that customization has to solve this problem, along
with a generous helping of C code to modify the behavior of keyboard
drivers via Registry settings.  Or some third party software tool.
Yuck.  Which is to say that the cure is looking more painful than the
problem.  Hopefully someone will suggest a simpler solution.

I will try once more to clarify the issues as I understand them:

1) There are two camps who want a particular behavior from the right
   Alt key on a Windows system.  I believe these behaviors are
   mutually exclusive:

   a) Right Alt key is a temporary locale modifier.
   b) Right Alt key is a Meta modifier key.

2) Some who want the temporary locale modifier on the right Alt key
   also believe that X-Windows systems should behave similarly.

3) The Emacs community is at risk of having well established
   conventions "stolen" [there is actually a better word than stolen
   but it is not coming to mind] by up-and-coming Windows UI
   conventions.

4) Various flavors of Windows, past, present and future, do or will
   exhibit different behaviors.

 > > Meanwhile I am very curious to know how Eli managed to get his system
 > > to provide both left and right Meta modifiers from the Alt keys.  If
 > > memory serves, when I last used Emacs on a Windows/2000/cygwin system,
 > > I did not have this problem.  But a freshly installed Windows/XP
 > > system on a Dell PC with a Logictech natural keyboard does exhibit the
 > > behavior.  Windows/XP has a very complex Locale setting mechanism in
 > > the control panel.  Perhaps this is where one needs to select a
 > > different locale, but it is not at all intuitively obvious how to do
 > > this such that the right Alt key will map to a Meta modifier.  Knowing
 > > what locale settings Eli is using might help some.
 > 
 > Tell me what to look at on my machine and what to report, and I will
 > tell you what I have here.  (I simply do not know what information
 > defines the ``Windows locale''.)

If you are running Windows/95/98/NT/2000, as is my guess, then your
Alt key behavior is not relevant to this discussion any more.  If you
are running Windows/XP then you should go to the Control Panel and
select "Regional and Language Options" and let us know where any
pulldowns on any tabs show anything but "United States (English)". For
example if you use a Hebrew input method that just happens to make the
right Alt key work like a Meta modifier, that would be good to know.
But it would also be inconsistent with my understanding of Paul's
issue. :-)

-pmr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  4:29         ` Eli Zaretskii
@ 2005-12-29 19:10           ` Paul Pogonyshev
  2005-12-29 19:37             ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-29 19:10 UTC (permalink / raw)
  Cc: pmr

Eli Zaretskii wrote:
> > > > I think it is related to the issue I raised under topic `wish: right alt/meta
> > > > to switch keyboard layout while pressed'.  I.e. right Alt acts as a temporary
> > > > layout switcher and so it does not look as Alt to applications.
> > > 
> > > Sorry, I'm not following: are you talking about keyboard language
> > > switch invoked on MS-Windows with the Alt-SPC combination?  If so,
> > > then the keyboard switch works for me as I'd expect (i.e., the same as
> > > it does in other Windows applications), and it doesn't affect the
> > > right Alt to META mapping in any way.
> > 
> > Well, you should have probably re-read that thread's opening message.
> 
> You must be kidding: I replied to that opening message.  It says:
> 
>     I currently find myself having to use Windows/XP for a short while.
>     ...
> 
> There's nothing here about language switching, just about rge right
> Alt key.

Yeah, but I said _that_ thread, not _this_ one.  I.e. I meant the thread
titled `wish: right alt/meta to switch keyboard layout while pressed'.

> > I'm talking about a common function of right Alt key: it temporary
> > (while pressed) disables the current layout and switches to English
> > layout.
> 
> I don't see this on MS-Windows.  Is this supposed to work on Windows?
> Note that the opening message clearly talks about Windows-related
> issues.

I have no idea how it works in Windows.  I just guessed that it might
work the same as it can be configured to work in X.  I certainly do
remember some very old MS-DOS cyrillic keyboard driver work like that
(temporary switching from Russian layout to English when the right Alt
is hold pressed.)

> > I guess _that's_ why right Alt doesn't work as Alt in Emacs for
> > Lennart Borgman.
> 
> The opening message wasn't from Lennart, it was from Paul Michael
> Reilly.

OK, sorry.

> > > Are we still talking about the MS-Windows port of Emacs?  Or are we
> > > talking about Emacs on GNU/Linux?  The OP raised the issue for
> > > Windows.
> > 
> > Now I'm talking about GNU/Linux, where Emacs is working incosistently with
> > the rest of the system.  It disregards Mode_switch (i.e. right Alt when
> > working in the layout-disabling mode I described above) when working with
> > LEIM.
> 
> That's another issue altogether, let's not add to confusion.

No it's not.  If someone proposes to override system differentiation
of the two Alt keys and treat them the same, while I propose to fully
honor the system differentiation of the Alt keys (if they are considered
different by the system to begin with), that's not another issue.  Those
are two opposing views on the same issue.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  6:08             ` Paul Michael Reilly
@ 2005-12-29 19:19               ` Paul Pogonyshev
  2005-12-30  4:56                 ` Richard M. Stallman
  2005-12-29 20:34               ` Eli Zaretskii
  2005-12-30  3:47               ` Stefan Monnier
  2 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-29 19:19 UTC (permalink / raw)
  Cc: Eli Zaretskii

Paul Michael Reilly wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
> 
>  > Reply-To: Eli Zaretskii <eliz@gnu.org>
>  > 
>  > > Date: Wed, 28 Dec 2005 19:00:07 -0500
>  > > From: Paul Michael Reilly <pmr@pajato.com>
>  > > CC: emacs-devel@gnu.org, eliz@gnu.org
>  > > 
>  > > Paul seems to be saying that the right Alt key has a compelling
>  > > function for some set of Users (temporary keyboard layout disable)
>  > 
>  > Paul was talking about GNU/Linux systems, not about MS-Windows.
> 
> I understood him to be saying that his Windoze issue also should
> apply to X-Windows.  His Windoze issue, as I interpret it, is about
> the use of the right Alt key to temporarily force the keyboard into a
> U.S. English locale so that a a key available in the U.S. English
> locale but overridden in the other locale can be made available.
> Suffice it to say that this is a related issue (to the use of right
> Alt as a Meta modifier key) to the extent that there are two functions
> that want to use the right Alt key.

I don't use Windows anymore, I just guessed that it might be the same
on Windows as I can configure it to be with `xkb'.  And yes, I think
the policy of Emacs should be the same on X or Windows.

> I will try once more to clarify the issues as I understand them:
> 
> 1) There are two camps who want a particular behavior from the right
>    Alt key on a Windows system.  I believe these behaviors are
>    mutually exclusive:
> 
>    a) Right Alt key is a temporary locale modifier.
>    b) Right Alt key is a Meta modifier key.

Just to clarify _my_ position: I belong to camp a), but I don't think that
Emacs should force my view upon others (less yet to force others' views
upon me ;)  I think that Emacs should behave just as the rest of the system
in this regard.  If my `xkb' is configured to treat the right Alt as
Mode_switch (camp a) locale modifier), wtf would Emacs suddenly think it
knows more about my preferences than me by making right Alt work as Meta?
The same logic holds for the case when `xkb' is configured to not
distinguish the two Alt keys.

I think Emacs _may_ have configuration options for this, but _by default_
it must be consistent with the rest of user's system.

> 2) Some who want the temporary locale modifier on the right Alt key
>    also believe that X-Windows systems should behave similarly.

No, it is the way round.  If I configure X Window System to behave this
way (in my case, from KDE Control Center), I expect every single X-aware
application to behave like I want.  Emacs being no exception.

> 3) The Emacs community is at risk of having well established
>    conventions "stolen" [there is actually a better word than stolen
>    but it is not coming to mind] by up-and-coming Windows UI
>    conventions.

You may also view it the way round: Emacs behaving not like the rest of
the system, pissing new users off.  Again, here customization might help,
but by default Emacs should behave like the rest of the system.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 19:10           ` Paul Pogonyshev
@ 2005-12-29 19:37             ` Stefan Monnier
  2005-12-29 21:13               ` Paul Pogonyshev
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2005-12-29 19:37 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, emacs-devel

>> That's another issue altogether, let's not add to confusion.

> No it's not.  If someone proposes to override system differentiation
> of the two Alt keys and treat them the same, while I propose to fully
> honor the system differentiation of the Alt keys (if they are considered
> different by the system to begin with), that's not another issue.  Those
> are two opposing views on the same issue.

Actually you are not proposing to "fully honor the system differentiation of
the Alt keys".  You are only proposing to make LEIM understand the
Mode_switch key.  Emacs already obeys your system's setup where what you
think of as a "right alt key" is actually not an alt key but a Mode_switch.
As a matter of fact, it'd be hard for Emacs not to obey this differentiation
because as far as Emacs is concerned this is *not* an alt key in any sense
of the word (otherwise it would send an Alt_L or Alt_R event and it'd be
bound to some modifier bit rather than sending a Mode_switch event).

So as Eli said, please let's not add to confusion.


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  6:08             ` Paul Michael Reilly
  2005-12-29 19:19               ` Paul Pogonyshev
@ 2005-12-29 20:34               ` Eli Zaretskii
  2005-12-29 23:22                 ` Paul Michael Reilly
  2005-12-30  3:47               ` Stefan Monnier
  2 siblings, 1 reply; 36+ messages in thread
From: Eli Zaretskii @ 2005-12-29 20:34 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel

> Date: Thu, 29 Dec 2005 01:08:12 -0500
> From: Paul Michael Reilly <pmr@pajato.com>
> CC: emacs-devel@gnu.org, pogonyshev@gmx.net
> 
>  > Paul was talking about GNU/Linux systems, not about MS-Windows.
> 
> I understood him to be saying that his Windoze issue also should
> apply to X-Windows.  His Windoze issue, as I interpret it, is about
> the use of the right Alt key to temporarily force the keyboard into a
> U.S. English locale so that a a key available in the U.S. English
> locale but overridden in the other locale can be made available.

My Windows box doesn't behave this way, as I already told here.

> And to make matters worse, I managed to scrounge around and dug up
> access to a Windows/2000 system and, lo and behold, both Alt keys
> operated as Meta modifier keys.  So my issue, so far, is a
> Windows/XP only issue.

My Windows box runs XP as well, so obviously not every XP system
exhibits your problem.  See below.

> 1) There are two camps who want a particular behavior from the right
>    Alt key on a Windows system.  I believe these behaviors are
>    mutually exclusive:
> 
>    a) Right Alt key is a temporary locale modifier.
>    b) Right Alt key is a Meta modifier key.

Does your Windows XP machine support a) ?

> 2) Some who want the temporary locale modifier on the right Alt key
>    also believe that X-Windows systems should behave similarly.

I believe X Windows already does that, at least with some window
managers.

>  > > Knowing what locale settings Eli is using might help some.
>  > 
>  > Tell me what to look at on my machine and what to report, and I will
>  > tell you what I have here.  (I simply do not know what information
>  > defines the ``Windows locale''.)
> 
> If you are running Windows/95/98/NT/2000

I run Windows XP.

> If you are running Windows/XP then you should go to the Control
> Panel and select "Regional and Language Options" and let us know
> where any pulldowns on any tabs show anything but "United States
> (English)".

It says "English (United States)", but under "Location" below it says
"Israel".  Which is what I want: I want an Israeli locale, but I want
English as the UI interface.

Aha, I think I know what is the source of your problem.  In the
"Regional and Language Options", press the "Languages" tab, then click
"Details".  In the dialog that pops up, click the "Key Settings"
button and look for an entry that uses the right Alt key.  If you can
get along without that function, disable it, which will change its key
to "None", and I think your right Alt key will behave as Meta.

> For example if you use a Hebrew input method that just
> happens to make the right Alt key work like a Meta modifier, that
> would be good to know.

No, my Key Settings dialog described above does not list any function
that is bound to the right Alt; the function "Switch to English-US"
has "None" listed as its key binding.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 19:37             ` Stefan Monnier
@ 2005-12-29 21:13               ` Paul Pogonyshev
  2005-12-30  0:55                 ` Juri Linkov
                                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-29 21:13 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, Stefan Monnier

Stefan Monnier wrote:
> >> That's another issue altogether, let's not add to confusion.
> 
> > No it's not.  If someone proposes to override system differentiation
> > of the two Alt keys and treat them the same, while I propose to fully
> > honor the system differentiation of the Alt keys (if they are considered
> > different by the system to begin with), that's not another issue.  Those
> > are two opposing views on the same issue.
> 
> Actually you are not proposing to "fully honor the system differentiation of
> the Alt keys".  You are only proposing to make LEIM understand the
> Mode_switch key.  Emacs already obeys your system's setup where what you
> think of as a "right alt key" is actually not an alt key but a Mode_switch.
> As a matter of fact, it'd be hard for Emacs not to obey this differentiation
> because as far as Emacs is concerned this is *not* an alt key in any sense
> of the word (otherwise it would send an Alt_L or Alt_R event and it'd be
> bound to some modifier bit rather than sending a Mode_switch event).

Frankly, I don't care a little bit how it looks from Emacs point of view.
It is not there for Emacs convenience, it is there for the user convenience.
When I configure `xkb' to make right Alt disable the current layout while
pressed, I expect right Alt to disable the current layout, sort of.  When
in Emacs right Alt is essentially ignored ([right Alt]-ъ types `ъ' just as
simple `ъ' does), that has no useful value for me at all.

If Mode_switch has multiple functions (I don't really know about `xkb'),
then it should possible for Emacs to decide which exact operation it should
perform on Mode_switch.  If it is not possible to deduce automatically, then
Emacs should ask the user (probably passively, by providing a customization
option.)

Yes, I'm proposing that LEIM behaves more like `xkb' layout switcher.  Do
you not see that they do the same thing: they switch layouts?  Do you not
agree that when there are such strong parallels between two different
mechanism functionalities, it is very convenient when they also have the
same interface?

> So as Eli said, please let's not add to confusion.

The current ignoring of Mode_switch confuses _me_ as a user.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 20:34               ` Eli Zaretskii
@ 2005-12-29 23:22                 ` Paul Michael Reilly
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Michael Reilly @ 2005-12-29 23:22 UTC (permalink / raw)
  Cc: pogonyshev, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

 > Reply-to: Eli Zaretskii <eliz@gnu.org>
 >...
 > I run Windows XP.
 > 
 > > If you are running Windows/XP then you should go to the Control
 > > Panel and select "Regional and Language Options" and let us know
 > > where any pulldowns on any tabs show anything but "United States
 > > (English)".
 > 
 > It says "English (United States)", but under "Location" below it says
 > "Israel".  Which is what I want: I want an Israeli locale, but I want
 > English as the UI interface.
 > 
 > Aha, I think I know what is the source of your problem.  In the
 > "Regional and Language Options", press the "Languages" tab, then click
 > "Details".  In the dialog that pops up, click the "Key Settings"
 > button and look for an entry that uses the right Alt key.  If you can
 > get along without that function, disable it, which will change its key
 > to "None", and I think your right Alt key will behave as Meta.
 > 
 > > For example if you use a Hebrew input method that just
 > > happens to make the right Alt key work like a Meta modifier, that
 > > would be good to know.
 > 
 > No, my Key Settings dialog described above does not list any function
 > that is bound to the right Alt; the function "Switch to English-US"
 > has "None" listed as its key binding.

Mine too.  How weird.  And very distressing.  Of course, I set my
location to Israel just to see if it made a difference.  It does not.
But then I probably need to reboot. :-) ... reboot has no effect.

...

Rather than hit ^C^C I went back to the XP box and probed around.  It
would appear that something in the Accessibility Options on the
Control Panel called "StickyKeys" is the ticket.  I turned the
"StickyKeys" option on and got the desired behavior.  Do a search in
the Help tool for "sticky keys" to get the gory details if you are
interested.

Thanks for shedding light on this issue.

-pmr

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 21:13               ` Paul Pogonyshev
@ 2005-12-30  0:55                 ` Juri Linkov
  2005-12-30 19:11                   ` Mode_switch and LEIM (was Re: Right Alt/Meta keys on Windows systems) Paul Pogonyshev
  2005-12-30  3:50                 ` Right Alt/Meta keys on Windows systems Stefan Monnier
  2005-12-30  4:02                 ` Mode_switch and LEIM Stefan Monnier
  2 siblings, 1 reply; 36+ messages in thread
From: Juri Linkov @ 2005-12-30  0:55 UTC (permalink / raw)
  Cc: pmr, eliz, monnier, emacs-devel

> Yes, I'm proposing that LEIM behaves more like `xkb' layout switcher.  Do
> you not see that they do the same thing: they switch layouts?  Do you not
> agree that when there are such strong parallels between two different
> mechanism functionalities, it is very convenient when they also have the
> same interface?

The only thing I wonder about is why do you enable a LEIM input method
while you are using a XIM input method at the same time?

When a LEIM input method is disabled, everything works correctly.
After switching a XIM input method with Group_switch and typing
a character while holding Mode_switch, Emacs inserts a Latin character.

When you do the same with a LEIM input method enabled, X sends a Latin
character to Emacs, and LEIM translates it to Cyrillic.  This is the correct
behavior for LEIM.  It is your decision to enable a LEIM input method.
Emacs doesn't enable it by default.

Isn't it easy for you just not to enable a LEIM input method?


-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29  6:08             ` Paul Michael Reilly
  2005-12-29 19:19               ` Paul Pogonyshev
  2005-12-29 20:34               ` Eli Zaretskii
@ 2005-12-30  3:47               ` Stefan Monnier
  2 siblings, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2005-12-30  3:47 UTC (permalink / raw)
  Cc: Eli Zaretskii, emacs-devel, pogonyshev

> I understood him to be saying that his Windoze issue also should
> apply to X-Windows.  His Windoze issue, as I interpret it, is about

No, he's not using Windows.  And he's not talking about the fact that
Emacs undesirably handles the right-alt key as an Alt modifier.

He's talking about something simply unrelated (from my point of view as an
Emacs maintainer, who cares about the events sent by the GUI and the code to
handle them, but can't care about the physical keys).


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 21:13               ` Paul Pogonyshev
  2005-12-30  0:55                 ` Juri Linkov
@ 2005-12-30  3:50                 ` Stefan Monnier
  2005-12-30  4:02                 ` Mode_switch and LEIM Stefan Monnier
  2 siblings, 0 replies; 36+ messages in thread
From: Stefan Monnier @ 2005-12-30  3:50 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, emacs-devel

> Frankly, I don't care a little bit how it looks from Emacs point of view.

That's OK.  Just please, please, pretty please, don't bring up your issue in
this thread, move it to some new thread.  There's already plenty of
confusion without it.

Please?


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Mode_switch and LEIM
  2005-12-29 21:13               ` Paul Pogonyshev
  2005-12-30  0:55                 ` Juri Linkov
  2005-12-30  3:50                 ` Right Alt/Meta keys on Windows systems Stefan Monnier
@ 2005-12-30  4:02                 ` Stefan Monnier
  2005-12-30 19:16                   ` Paul Pogonyshev
  2 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2005-12-30  4:02 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, emacs-devel

> When I configure `xkb' to make right Alt disable the current layout while
> pressed, I expect right Alt to disable the current layout, sort of.  When
> in Emacs right Alt is essentially ignored ([right Alt]-ъ types `ъ' just as
> simple `ъ' does), that has no useful value for me at all.

[ Note to self: remember that whenever he writes "right alt" it really means
  "the key labelled `alt' to right of the space bar which in my
  configuration sends the Mode_Switch event". ]

Do you have a key ъ on your keyboard?  Or do you use an input method to
get this?  If so, is it an XIM or LEIM input method?  Which XIM (or which
LEIM as the case may be) input method was it?

>From the last time you brought up this issue, I'd guess that you're using
a LEIM input method.  LEIM ignores the Mode_switch event.  You should
currently use C-\ instead (and yes, I know it can't be used as a modifier so
it's a bit different).

> Yes, I'm proposing that LEIM behaves more like `xkb' layout switcher.  Do
> you not see that they do the same thing: they switch layouts?  Do you not
> agree that when there are such strong parallels between two different
> mechanism functionalities, it is very convenient when they also have the
> same interface?

Nobody rejected your proposition.  You'll just have to find someone to write
the patch for it.


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-29 19:19               ` Paul Pogonyshev
@ 2005-12-30  4:56                 ` Richard M. Stallman
  2005-12-30 19:12                   ` Paul Pogonyshev
  0 siblings, 1 reply; 36+ messages in thread
From: Richard M. Stallman @ 2005-12-30  4:56 UTC (permalink / raw)
  Cc: pmr, eliz, emacs-devel

    I don't use Windows anymore,

Congratulations!  Have you moved to a free operating system?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-28 20:54         ` Lennart Borgman
@ 2005-12-30  8:54           ` Mathias Dahl
  0 siblings, 0 replies; 36+ messages in thread
From: Mathias Dahl @ 2005-12-30  8:54 UTC (permalink / raw)


Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Using the menus is otherwise a pain. But
> instead I sacrifice the use of the left and right Windows keys. For me
> this is far better since I use the menus much more often when the
> Windows keys. (In fact I never use the left and right windows keys - 
> except in Emacs. I use Ctrl-Esc instead.)

This is off-topic, I know:

I think you miss out quite many nice keyboard shortcuts in Windows if
you "disabled" those keys. Just some example: W-r, W-e, W-d, W-m,
W-Pause/Break etc. Also, it is great to have it as an extra modifier
key in Windows in general if you have a program that can bind
commands/programs to it.

I am sure you know about F10 doing the same as a single left Alt key
press, and I know it is not exactly as convenient as you cannot press
it at the same time as another key, for example Alt-f, for activating
the File menu. Maybe you should try out Drew's menu navigator thingy
(which uses icicles, which in turn I am not comfortable with, but...).

Anyway, we could discuss this off-list instead. Things like keyboard
shortcuts and other productivity enhancements and time savers is of
great interest to me.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM (was Re: Right Alt/Meta keys on Windows systems)
  2005-12-30  0:55                 ` Juri Linkov
@ 2005-12-30 19:11                   ` Paul Pogonyshev
  2005-12-31  0:59                     ` Mode_switch and LEIM Juri Linkov
  0 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-30 19:11 UTC (permalink / raw)
  Cc: Juri Linkov, pmr, eliz, monnier

Juri Linkov wrote:
> > Yes, I'm proposing that LEIM behaves more like `xkb' layout switcher.  Do
> > you not see that they do the same thing: they switch layouts?  Do you not
> > agree that when there are such strong parallels between two different
> > mechanism functionalities, it is very convenient when they also have the
> > same interface?
> 
> The only thing I wonder about is why do you enable a LEIM input method
> while you are using a XIM input method at the same time?

Because non-Emacs apps don't have LEIM and LEIM in Emacs is more convenient
that system-wide `xkb', because with `xkb' there was no way to type `M-d'
in Russian layout, it would work as `M-в' instead.  OK, I see now there is
(just checked), but still there is no way to use things like `C-x t' when
using `xkb' Russian layout (`C-x е' instead.)

I'm ranting about LEIM not reacting to Mode_switch.  In fact, Emacs simply
ignores the modifier.

> When a LEIM input method is disabled, everything works correctly.
> After switching a XIM input method with Group_switch and typing
> a character while holding Mode_switch, Emacs inserts a Latin character.

Yeah, but `xkb' handling in Emacs has more significant disadvantages, see
above.

> When you do the same with a LEIM input method enabled, X sends a Latin
> character to Emacs, and LEIM translates it to Cyrillic.  This is the correct
> behavior for LEIM.  It is your decision to enable a LEIM input method.
> Emacs doesn't enable it by default.
> 
> Isn't it easy for you just not to enable a LEIM input method?

See above.  I'm using LEIM because it is more convenient, but it lacks one
specific feature compared to `xkb'.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-30  4:56                 ` Richard M. Stallman
@ 2005-12-30 19:12                   ` Paul Pogonyshev
  2005-12-31 17:40                     ` Richard M. Stallman
  0 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-30 19:12 UTC (permalink / raw)
  Cc: pmr, eliz

Richard M. Stallman wrote:
>     I don't use Windows anymore,
> 
> Congratulations!  Have you moved to a free operating system?

Yes.  Three years ago or so.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-30  4:02                 ` Mode_switch and LEIM Stefan Monnier
@ 2005-12-30 19:16                   ` Paul Pogonyshev
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-30 19:16 UTC (permalink / raw)
  Cc: pmr, Eli Zaretskii, Stefan Monnier

Stefan Monnier wrote:
> > When I configure `xkb' to make right Alt disable the current layout while
> > pressed, I expect right Alt to disable the current layout, sort of.  When
> > in Emacs right Alt is essentially ignored ([right Alt]-ъ types `ъ' just as
> > simple `ъ' does), that has no useful value for me at all.
> 
> [ Note to self: remember that whenever he writes "right alt" it really means
>   "the key labelled `alt' to right of the space bar which in my
>   configuration sends the Mode_Switch event". ]
> 
> Do you have a key ъ on your keyboard?  Or do you use an input method to
> get this?  If so, is it an XIM or LEIM input method?  Which XIM (or which
> LEIM as the case may be) input method was it?

I have a key labelled as both `]' (for English layout) and `ъ' (for Russian.)
I use LEIM in Emacs, because with XIM I cannot invoke bindings like `C-x v ='
(becomes `C-x м =') and until recently I couldn't even type `M-d' (would get
`M-в' instead), but now this works OK.  Also, with XIM I cannot have separate
input methods for each buffer.

I use `russian-computer' LEIM input method.

> >From the last time you brought up this issue, I'd guess that you're using
> a LEIM input method.  LEIM ignores the Mode_switch event.  You should
> currently use C-\ instead (and yes, I know it can't be used as a modifier so
> it's a bit different).

Everything correct.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-30 19:11                   ` Mode_switch and LEIM (was Re: Right Alt/Meta keys on Windows systems) Paul Pogonyshev
@ 2005-12-31  0:59                     ` Juri Linkov
  2005-12-31  5:00                       ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Juri Linkov @ 2005-12-31  0:59 UTC (permalink / raw)
  Cc: pmr, eliz, monnier, emacs-devel

>> The only thing I wonder about is why do you enable a LEIM input method
>> while you are using a XIM input method at the same time?
>
> Because non-Emacs apps don't have LEIM and LEIM in Emacs is more convenient
> that system-wide `xkb', because with `xkb' there was no way to type `M-d'
> in Russian layout, it would work as `M-в' instead.  OK, I see now there is
> (just checked), but still there is no way to use things like `C-x t' when
> using `xkb' Russian layout (`C-x е' instead.)

OK, now I understand that you prefer LEIM due to its advantages (separate
input methods for each buffer) as well as to the disadvantages of handling
XIM in Emacs (can't type command key sequences).

Now I have the opposite question: why do you enable a XIM input method
while you are using a LEIM input method at the same time.  Is it because
you enable a global XIM input method for all applications?  Is it possible
to enable XIM input methods separately in each application including Emacs
instead of enabling a global XIM input method?

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-31  0:59                     ` Mode_switch and LEIM Juri Linkov
@ 2005-12-31  5:00                       ` Stefan Monnier
  2005-12-31 16:04                         ` Paul Pogonyshev
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2005-12-31  5:00 UTC (permalink / raw)
  Cc: pmr, eliz, emacs-devel, Paul Pogonyshev

> Now I have the opposite question: why do you enable a XIM input method
> while you are using a LEIM input method at the same time.

I don't think he doesn't use them both at the same time.  All he says is
"when I use XIM I like the Mode_switch thingy, can I have it for LEIM too?"


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-31  5:00                       ` Stefan Monnier
@ 2005-12-31 16:04                         ` Paul Pogonyshev
  2005-12-31 16:52                           ` Stefan Monnier
  0 siblings, 1 reply; 36+ messages in thread
From: Paul Pogonyshev @ 2005-12-31 16:04 UTC (permalink / raw)
  Cc: Juri Linkov, pmr, eliz, Stefan Monnier

Stefan Monnier wrote:
> > Now I have the opposite question: why do you enable a XIM input method
> > while you are using a LEIM input method at the same time.
> 
> I don't think he doesn't use them both at the same time.  All he says is
> "when I use XIM I like the Mode_switch thingy, can I have it for LEIM too?"

Exactly.  I use XIM only in other applications.  So, in most applications
(where I use XIM), I can use Mode_switch (mapped to right Alt), while in
Emacs I can't because I use LEIM there.

I wish there was a way to have a `perfect' input method system in Emacs.
I think LEIM is closer to that ideal and it is easier to improve it even
further.  For instance, it is probably very difficult (if at all possible)
to implement separate XIM input methods per buffer.

WRT LEIM I have two wishes:
a) Mode_switch handling like in XIM;
b) a way to switch input methods using the same key as is used for switching
   XIM input methods (but this is probably way too difficult and cannot be
   done without hacking external software).

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-31 16:04                         ` Paul Pogonyshev
@ 2005-12-31 16:52                           ` Stefan Monnier
  2006-01-01 19:18                             ` Paul Pogonyshev
  0 siblings, 1 reply; 36+ messages in thread
From: Stefan Monnier @ 2005-12-31 16:52 UTC (permalink / raw)
  Cc: Juri Linkov, pmr, eliz, emacs-devel

> b) a way to switch input methods using the same key as is used for switching
>    XIM input methods (but this is probably way too difficult and cannot be
>    done without hacking external software).

How does it work in XIM?


        Stefan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-30 19:12                   ` Paul Pogonyshev
@ 2005-12-31 17:40                     ` Richard M. Stallman
  2005-12-31 18:47                       ` David Kastrup
  0 siblings, 1 reply; 36+ messages in thread
From: Richard M. Stallman @ 2005-12-31 17:40 UTC (permalink / raw)
  Cc: pmr, eliz, emacs-devel

    > Congratulations!  Have you moved to a free operating system?

    Yes.  Three years ago or so.

I guess it rather late to welcome you to the Free World.
But you're welcome anyway.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Right Alt/Meta keys on Windows systems
  2005-12-31 17:40                     ` Richard M. Stallman
@ 2005-12-31 18:47                       ` David Kastrup
  0 siblings, 0 replies; 36+ messages in thread
From: David Kastrup @ 2005-12-31 18:47 UTC (permalink / raw)
  Cc: pmr, eliz, emacs-devel, Paul Pogonyshev

"Richard M. Stallman" <rms@gnu.org> writes:

>     > Congratulations!  Have you moved to a free operating system?
>
>     Yes.  Three years ago or so.
>
> I guess it rather late to welcome you to the Free World.
> But you're welcome anyway.

You'll always be able to welcome people to free software before its
license runs out.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Mode_switch and LEIM
  2005-12-31 16:52                           ` Stefan Monnier
@ 2006-01-01 19:18                             ` Paul Pogonyshev
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Pogonyshev @ 2006-01-01 19:18 UTC (permalink / raw)
  Cc: Juri Linkov, pmr, eliz, Stefan Monnier

Stefan Monnier wrote:
> > b) a way to switch input methods using the same key as is used for switching
> >    XIM input methods (but this is probably way too difficult and cannot be
> >    done without hacking external software).
> 
> How does it work in XIM?

Uh, actually, I don't know.  I use KDE as desktop environment and it handles
layouts itself.  Layout switching is bound to a key combination (by default
it is Ctrl+K, but I use Win+Space) and each time the combination is pressed,
the current layout is switched to the next one from a predefined set (I have
only English and Russian in this set.)

I assume KDE just calls `setxkbmap' each time the layout is changed, at
least it shows command line for it in the `Keyboard Layout' Control Center
page.  For me it shows these two command lines:

	setxkbmap -model pc104 -layout us -variant basic
	setxkbmap -model pc104 -layout us,ru -variant ,winkeys

The first is for U.S. English, the second is for Russian.

Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2006-01-01 19:18 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-28 15:41 Right Alt/Meta keys on Windows systems Paul Michael Reilly
2005-12-28 17:27 ` Lennart Borgman
2005-12-28 19:14   ` Eli Zaretskii
2005-12-28 19:55     ` Lennart Borgman
2005-12-28 19:13 ` Eli Zaretskii
2005-12-28 19:55   ` Paul Pogonyshev
2005-12-28 20:15     ` Eli Zaretskii
2005-12-28 20:31       ` Paul Pogonyshev
2005-12-28 20:54         ` Lennart Borgman
2005-12-30  8:54           ` Mathias Dahl
2005-12-29  0:00         ` Paul Michael Reilly
2005-12-29  0:07           ` Lennart Borgman
2005-12-29  4:45           ` Eli Zaretskii
2005-12-29  6:08             ` Paul Michael Reilly
2005-12-29 19:19               ` Paul Pogonyshev
2005-12-30  4:56                 ` Richard M. Stallman
2005-12-30 19:12                   ` Paul Pogonyshev
2005-12-31 17:40                     ` Richard M. Stallman
2005-12-31 18:47                       ` David Kastrup
2005-12-29 20:34               ` Eli Zaretskii
2005-12-29 23:22                 ` Paul Michael Reilly
2005-12-30  3:47               ` Stefan Monnier
2005-12-29  4:29         ` Eli Zaretskii
2005-12-29 19:10           ` Paul Pogonyshev
2005-12-29 19:37             ` Stefan Monnier
2005-12-29 21:13               ` Paul Pogonyshev
2005-12-30  0:55                 ` Juri Linkov
2005-12-30 19:11                   ` Mode_switch and LEIM (was Re: Right Alt/Meta keys on Windows systems) Paul Pogonyshev
2005-12-31  0:59                     ` Mode_switch and LEIM Juri Linkov
2005-12-31  5:00                       ` Stefan Monnier
2005-12-31 16:04                         ` Paul Pogonyshev
2005-12-31 16:52                           ` Stefan Monnier
2006-01-01 19:18                             ` Paul Pogonyshev
2005-12-30  3:50                 ` Right Alt/Meta keys on Windows systems Stefan Monnier
2005-12-30  4:02                 ` Mode_switch and LEIM Stefan Monnier
2005-12-30 19:16                   ` Paul Pogonyshev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).