Re: Where are the key codes for GdkEventKey defined?



Chris Vine wrote:
On Sunday 17 April 2005 15:47, Matthias Kaeppler wrote:

So, I want to handle key-press events, and I need the constants which
define the key codes.
I have been searching for hours now, this mailing list, the internet,
and I even grep'ed through the gtkmm/gdkmm/glibmm header files to find
out where the key-codes are defined (I suppose there /is/ something like
GDK_ENTER or such?).
The Gtk+ reference only said it was defined in <gdk/gdkkeysym.h>, but
this header does not exist in my gtkmm-2.4 installation.

Please don't tell me I have to use raw numbers to catch key events :)


#include <gdk/gdkkeysyms.h>

Chris


Oh well, looks like the Gtk+ reference has an error then:
It talks about <gdk/gdkkeysym.h> (note the missing 's').
No wonder `find` didn't turn up anything.

I have another question though:
Since most other GDK_XYZ makros are redefined as real constants in gdkmm, by making it Gdk::XYZ, why not so with the key codes?
That makes the use somewhat inconsistent.
For example, gdkmm maps GDK_KEY_PRESS to Gdk::KEY_PRESS, but it doesn't do so with the key codes.

How come?

--
Matthias Kaeppler




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