[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bikeshedding go! Why is <M-f4> unbound?

From: Óscar Fuentes
Subject: Re: Bikeshedding go! Why is <M-f4> unbound?
Date: Wed, 05 Jan 2011 19:15:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Deniz Dogan <address@hidden> writes:

>>> > In KDE, pressing Alt-F4 is the same as clicking on the close button. The
>>> > keypress is intercepted by KDE and Emacs never sees it. IIRC that's not
>>> > the case for Windows.
>>> >
>>> I don't know about KDE, but on Windows it says the key is undefined.
>>> So is there any problem in binding it on Windows?
>> I don't think so.  AFAIK, Alt-F4 is a window manager keybinding, not
>> an Emacs keybinding.  The MS-Windows "window manager" doesn't have
>> that binding.
> That sounds strange, but I suppose that's reasonable to assume. Do
> "all of the other" Windows applications make this binding themselves?

IIRC, on Windows all events (*) go to the application first. The
application usually delegates into a Windows API fallback the handling
of the events it doesn't know about. So you can handle Alt-F4 on your
app and do whatever you want, as Emacs does, or delegate into the
Windows API function (ProcessMessages ?) which performs the standard
action associated with the event (if any) as 99% of Windows apps do.

IMO, Emacs is doing the right thing, because it allows treating Alt-F4
as just another key combination. I see no problem binding Alt-F4 to some
exit function, as long as the user can override that.

* There is a mechanism for intercepting events before they are seen by
  ordinary applications (global hooks). There are some events too that
  are always handled by the OS due to security reasons.

reply via email to

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