Re: [gtk-list] Re: proposals
- From: Damon Chaplin <damon karuna freeserve co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: proposals
- Date: Wed, 11 Aug 1999 09:47:57 +0100
Conrad Steenberg wrote:
>
> Hi
>
> With all this discussion about mouse-button actions with keys pressed and
> whatnot, I have related programming question:
>
> How can I implement testing for the shift/ctrl/ etc. ? Can I do this in a
> button_press_event handler in some way? Or do I have to have a
> key_pressed_event handler that watches for keypresses and sets flags that
> the button_press_event handlers can test for?
A lot of the GdkEventXXX structs contain a 'state' field which tells you which
modifiers are currently pressed.
So you normally do:
if (event->state & GDK_CONTROL_MASK)
Look at GdkModifierType in gdk/gdktypes.h for a list of modifiers/buttons
available.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]