-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michal Porzuczek wrote:
> Question 2. How is it possible to perform key commands such as
> Ctrl+D for example. Using the key_press_event callback I tried
> using nested ifs like this to no avail:
>
> if (event->keyval == 65507) if (event->keyval == 65361)
I'm not really sure what you're trying to do there: how can
event->keyval be equal to two different things at once?
Use the constants in gdk/gdkkeysyms.h for the actual key (in your
case, the 'd' key), and use the modifier constants, checking
event->state. Check out the GdkModifierType enum in gdk/gdktypes.h.
So you'd do something like:
if(event->keyval == GDK_D && event->state & GDK_CONTROL_MASK)
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFCl39d6XyW6VEeAnsRArXxAJ4irKJAxmA4WWwLd/KecP9XLJJ8NgCfcTRW
838/q91dsx8ComWG2ZyVUZk=
=LbVc
-----END PGP SIGNATURE-----
_______________________________________________
gtk-app-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list