emacs-devel
[Top][All Lists]
Advanced

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

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


From: Lennart Borgman
Subject: Re: Bikeshedding go! Why is <M-f4> unbound?
Date: Tue, 18 Jan 2011 14:33:35 +0100

On Tue, Jan 18, 2011 at 2:15 PM, grischka <address@hidden> wrote:
> Óscar Fuentes wrote:
>>>
>>> Well, it would be difficult to determine on the Windows level whether
>>> the single keystroke was maybe part of C-x M-f4 or C-h M-f4.  So in
>>> any case it is better to reuse emacs central event parser.
>>
>> This is unnecesary too. Alt-F4 must work irrespectively of the prefix
>> keys typed so far: if you type C-x or C-h and then click on the Close
>> button on the top right of the frame, Emacs thinks you want to exit the
>> application. Alt-F4 must have the same effect as clicking that button
>> (when M-f4 is unbound on Emacs, hence the need for checking the binding
>> from the Windows event loop).
>
> A matter of taste.

And structure. The structure used for handling key sequences is not
very compatible with breaking them at any point. Neither is the
semantic structure for this.


>>>    (global-set-key [M-f4] 'w32-syskey)

Please don't forget that it is Alt+F4 we have been discussing, not M-f4.

When it comes to implementation, if you want to try to just requeue
the WM_... messages then a possible implementation could be something
like:

- Save all keyboard WM_... events in a stack.
- Clear this stack by sending a w32 message from the lisp thread when
a key sequence is used.
- When a key sequence instead is unbound then requeue the messages
from this stack and clear the stack.

Though as I said I am a bit doubtful that this simple scheme will work
(it might upset windows keyboard state) it is not very much work to
test it.

If it does not work then look at the SendKeys API.



reply via email to

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