From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Bikeshedding go! Why is unbound? Date: Wed, 05 Jan 2011 19:15:14 +0100 Message-ID: <87k4ijz07h.fsf@telefonica.net> References: <87sjx7z7w4.fsf@telefonica.net> <83pqsbmf6j.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1294251339 3248 80.91.229.12 (5 Jan 2011 18:15:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 Jan 2011 18:15:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 05 19:15:36 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PaXtW-0001La-Q3 for ged-emacs-devel@m.gmane.org; Wed, 05 Jan 2011 19:15:35 +0100 Original-Received: from localhost ([127.0.0.1]:37155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaXtW-0004hY-3N for ged-emacs-devel@m.gmane.org; Wed, 05 Jan 2011 13:15:34 -0500 Original-Received: from [140.186.70.92] (port=52167 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaXtR-0004hJ-Nz for emacs-devel@gnu.org; Wed, 05 Jan 2011 13:15:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaXtQ-0007U2-Ju for emacs-devel@gnu.org; Wed, 05 Jan 2011 13:15:29 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:37593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaXtQ-0007Tm-73 for emacs-devel@gnu.org; Wed, 05 Jan 2011 13:15:28 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PaXtO-0001Fp-1e for emacs-devel@gnu.org; Wed, 05 Jan 2011 19:15:26 +0100 Original-Received: from 212.red-88-24-214.staticip.rima-tde.net ([88.24.214.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Jan 2011 19:15:26 +0100 Original-Received: from ofv by 212.red-88-24-214.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Jan 2011 19:15:26 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 212.red-88-24-214.staticip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:EtRHxd3t7HFgkexcOMWbBbK/DwM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134294 Archived-At: Deniz Dogan 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.