Exemplo n.º 1
0
static gboolean
skbdwin_key_press(GtkWidget *w, GdkEventKey *ev, gpointer p)
{

	if (ev->type == GDK_KEY_PRESS) {
		if ((ev->keyval != GDK_KEY_F12) || (np2oscfg.F12KEY != 0))
			gtkkbd_keydown(ev->keyval);
		return TRUE;
	}
	return FALSE;
}
Exemplo n.º 2
0
/*
 - Signal: gboolean GtkWidget::key_press_event (GtkWidget *widget,
          GdkEventKey *event, gpointer user_data)
*/
static gboolean
key_press_evhandler(GtkWidget *w, GdkEventKey *ev, gpointer p)
{

	if (ev->keyval == GDK_F11) {
		if ((np2oscfg.F11KEY == 1) && (scrnmode & SCRNMODE_FULLSCREEN))
			xmenu_toggle_menu();
		else if (np2oscfg.F11KEY == 2)
			xmenu_select_screen(scrnmode ^ SCRNMODE_FULLSCREEN);
	} else if ((ev->keyval == GDK_F12) && (np2oscfg.F12KEY == 0))
		xmenu_toggle_item(NULL, "mousemode", !np2oscfg.MOUSE_SW);
	else
		gtkkbd_keydown(ev->keyval);
	return TRUE;
}