Re: Key Listener



Key presses are handled with signals (which are like events, if you've
used those before). Here's the appendix from the gtkmm book that's all
about signals:

http://library.gnome.org/devel/gtkmm-tutorial/unstable/chapter-signals.html.en

Here's the API documentation which describes the precise interface for
the key_pressed signal which is defined by the Gtk::Widget class (which
most of the stuff in gtkmm derives from):

http://library.gnome.org/devel/gtkmm/unstable/classGtk_1_1Widget.html#aa1a2371482cc55309d13c6f828e190f2

This is just a general description of signals and slots, in case you're
not quite clear on them yet:

http://en.wikipedia.org/wiki/Signals_and_slots

And here is a tutorial on connecting to signals with libsigc++, which is
the signal library gtkmm uses:

http://libsigc.sourceforge.net/libsigc2/docs/manual/html/ch02.html

On Thu, 2010-05-06 at 12:50 +0000, TalGuy385 gmail com wrote:
> I am pretty new to the gtkmm and gui programming. I've searched the
> web for examples but can't find any that would show me how to detect
> if a key is pressed and how to handle that key input. Could someone
> point me in the right direction to handle key events? Also is there a
> header file that list all the keys and their key codes that gtkmm
> supports so that I don't have to create my own?
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list




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