Re: Do something clever on a keypress with Gtk2-0.92?



-- Tom Cross <tomc kendeco com> wrote
(on Thursday, 07 August 2003, 03:08 PM -0500):
I'm using Gtk2-0.92 and I'm enjoying it (and SimpleList)!  However I'm
having trouble finding out how to call a subroutine when a certain key
is pressed.

I know I can do that with a menubar at the top, or maybe track events,
but I don't want a menubar at the top and I'm struggling with events.

Does anyone have example code that could help me out?

Either I want to make an accelgroup without the menu, or just trap
certain key-press events.  I'm lost on how to do either.

You might try ItemFactory -- you could build the menu with the callbacks
and accelgroup, hook it up to the window, but simply not display it. I
recently created something similar, and it should work. Email me if you
want an example.

-- 
Matthew Weier O'Phinney
http://weierophinney.net/matthew/



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