Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

capture gtk kill (gnome alt-f4) (delete-event?)

11 views
Skip to first unread message

Yagnesh Raghava Yakkala

unread,
May 26, 2012, 1:19:04 AM5/26/12
to help-gn...@gnu.org

Hello.,

is there a way I can capture alt-f4 (in gnome) and act within Emacs.?

This is because, recent times, I am killing Emacs by mistake with
alt-f4.

I am longing for a function which captures alt-f4 event and ask me for
confirmation in all circumstances.


Thanks.,
--
ఎందరో మహానుభావులు అందరికి వందనములు
YYR


XeCycle

unread,
May 26, 2012, 1:26:49 AM5/26/12
to help-gn...@gnu.org
Yagnesh Raghava Yakkala <yag...@live.com> writes:

> Hello.,
>
> is there a way I can capture alt-f4 (in gnome) and act within Emacs.?
>
> This is because, recent times, I am killing Emacs by mistake with
> alt-f4.
>
> I am longing for a function which captures alt-f4 event and ask me for
> confirmation in all circumstances.

Don't think there will be one, since it may or may not work.

The key is received by X server, then goes to whichever program
that binds this key; if the key is first bound by the window
manager, it may or may not allow rebinds of it.

You'd better play with it in your window manager.

--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591

Yagnesh Raghava Yakkala

unread,
May 26, 2012, 2:28:12 AM5/26/12
to XeCycle, help-gn...@gnu.org

Hello XeCycle,

Thanks for the reply.,

XeCycle <XeC...@Gmail.com> writes:

> Yagnesh Raghava Yakkala <yag...@live.com> writes:
>
[…]
>> I am longing for a function which captures alt-f4 event and ask me for
>> confirmation in all circumstances.
>
> Don't think there will be one, since it may or may not work.
>
> The key is received by X server, then goes to whichever program
> that binds this key; if the key is first bound by the window
> manager, it may or may not allow rebinds of it.

I thought it is possible since Emacs is asking for confirmation(with
unsaved buffer exist) when I click [X] button with mouse on a Emacs frame.

They are the same signals., aren't they?


PS: FWIW I am using Gtk(2.20.1-2), Gnome (2.30.2) on Debian squeeze.

XeCycle

unread,
May 26, 2012, 3:36:30 AM5/26/12
to help-gn...@gnu.org
Yagnesh Raghava Yakkala <yag...@live.com> writes:

[...]

> I thought it is possible since Emacs is asking for confirmation(with
> unsaved buffer exist) when I click [X] button with mouse on a Emacs frame.
>
> They are the same signals., aren't they?

If Emacs acts differently on them, they must be different.
0 new messages