How can we find whether a menu item was activated by Shift+Click?



Hi,
  In my application, I want to differentiate between Shift+Click and
Click of a menuitem. The menuitem is a proxy for a GtkAction. I also
have a toolbar item proxy for the same GtkAction.

/* sample snippet */

void 
my_action_callvack (GtkAction* action, gpointer user_data)
{
     if (SHIFT PRESSED) { //during the activaton of the GtkAction
               //display dialog
     }
    else {
              //set the default attributes
     }
}

My problem is that I don't know how to detect whether SHIFT key was
pressed? I know that GdkModifierType is related to this. But I am
unable to proceed with this..

I can not use "button_press_event"... Is there any way? Please help me..

Thanks,
Santhosh.



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