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

Re: newbie key binding question



I am not a 100%, but cant you bind key_press to the window? Then you would
have to distinguish which key was pressed. I have done this with gtk.Entry.
Have you tried gtk.Button.connect('key_press_event', button_press_function)
Like i said not 100%.

On Mon, Nov 24, 2008 at 12:23 PM, Michael Cronenworth <mike cchtml com>wrote:

> Hi all, I'm new to GTK+ usage, but I'm learning quickly.
>
> I wish to set up a key (say, F4) and have it attached to a button, so when
> F4 is pressed the button's signal is emitted just like a mouse click. I'm
> familiar with setting up global accelerators (CTRL+Q, etc), but all I want
> is a single key binding on one button widget on one widget instance. This
> will not be used globally and only one time. I've seen the GtkBinding page
> and how it describes RC file usage, but I'd rather not use such a beefy
> method for just one key...
>
> Any pointers are welcome.
>
> Thanks,
> Michael
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>


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