开发者

Hooking CTRL pressed in GTK+ application

开发者 https://www.devze.com 2023-01-23 00:22 出处:网络
How can I hook CTRL pressed in 开发者_如何转开发\"drawingarea_button_press_event_cb\" function of GTK+ application?

How can I hook CTRL pressed in 开发者_如何转开发"drawingarea_button_press_event_cb" function of GTK+ application?

void drawingarea_button_press_event_cb( GtkWidget *widget, GdkEventButton *event )
{
 ........
}


Inspect the state field of the GdkEventButton structure. It will have the GDK_CONTROL_MASK bit set if Control is being held down:

if(event->state & GDK_CONTROL_MASK)
  printf("You're totally in control!\n");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号