Re: Really global accelerators ?
- From: Paolo Molaro <lupus ximian com>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: Really global accelerators ?
- Date: Sun, 18 Nov 2001 22:55:49 +0100
On 10/16/01 Pedro Caria wrote:
I can't seem to find a way to have an accelerator that works all the
time...
My problem: I want to use ctrl-w to activate something in my program,
but if the focus is in a GtkEntry, ctrl-w is bound to kill word... is
there any way around this ?
I have tried attach accels to the GtkEntry, tried changing the bindings
in gtkrc, tried shuting off the signals in the GtkEntry... nothing seems
to work...
A key event is first sent to the toplevel window: you should be able to
handle it there, if that doesn't work, your code doesn't do the right
things.
Anyway, there is also another way to get keyboard events before Gtk
sends them to the widgets:
Gtk->key_snooper_install (\&handler);
with:
sub handler {
my ($widget, $gdkevent, @args) = @_;
#return 1; # if we want to handle the key event ourselves
return 0;
}
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]