Subject: Re: "Stuck" Meta (Alt) key?

From: Andrew Innes <[email-masked]>
Date: Fri, 1 Nov 1996 12:46:37 GMT

On Thu, 31 Oct 96 16:40 EST, "David L Kindred (Dave)" <[email-masked]> said:
>I am using 19.34 under Windows 95 and have several times found myself
>in a state where the system thinks that the Meta (Alt) key is still
>depressed when I am attempting to perform another keyboard or mouse
>function.  Depressing and releasing Alt clears the condition.
>
>Is this an Emacs issue, a Windows 95 issue, my typing style or just a
>fluke?

A mixture of the first three.

In normal Windows programs, pressing and releasing the Alt key is a
standard system-supported method for beginning keyboard navigation of
the current window's menu.

Normally there is a menu bar in the window you are using, and the
left-most menu will be hilighted when you press and release Alt, for
visual feedback.  You can then use cursor keys etc to navigate.
Pressing and releasing Alt a second time deactivates the menu.

If there isn't a menu bar, but there is a "system" menu (the little icon
in the left corner of the title bar), then the system menu is activated
instead (but it doesn't drop down until you type Space).  Before Windows
95 and NT 4.0, the system menu icon would be hilighted as well, but now
it is a minature of the program icon and there is no visual clue that it
is active.

Emacs is a bit unusual in that it processes keystrokes at a lower level
than most Windows programs do, and allows for the normal menu bar to be
removed, while still allowing the system menu to be accessed.

At some point (I think in 19.31 but maybe 19.32), the variable
`win32-pass-alt-to-system' was added to control whether pressing and
releasing Alt would activate the menu bar (or system menu).  By default,
this variable is nil, so Alt will not activate the menu.  So you should
only be seeing a problem if you enable this feature and also turn off
menu-bar-mode (which is on by default).

In this case, you need to expect the behaviour you are experiencing.
Unless you actually want to access the system menu by keyboard, just set
win32-pass-alt-to-system to nil.

AndrewI