add: case WKBD_WINDOW1: case WKBD_WINDOW2: case WKBD_WINDOW3: case WKBD_WINDOW4: if (scr->shortcutWindow[command-WKBD_WINDOW1]) { wMakeWindowVisible(scr->shortcutWindow[command-WKBD_WINDOW1]); } else if (wwin && ISMAPPED(wwin) && ISFOCUSED(wwin)) { scr->shortcutWindow[command-WKBD_WINDOW1] = wwin; wSelectWindow(wwin, !wwin->flags.selected); XFlush(dpy); wusleep(3000); wSelectWindow(wwin, !wwin->flags.selected); XFlush(dpy); } break;
context: handleKeyPress(XEvent *event){    WScreen *scr = wScreenForRootWindow(event->xkey.root);    WWindow *wwin = scr->focused_window;    int i;    int modifiers;    int command=-1;    /* ignore CapsLock */    modifiers = event->xkey.state & ValidModMask;    for (i=0; i<WKBD_LAST; i++) {	if (wKeyBindings[i].keycode==0) 	    continue;		if (wKeyBindings[i].keycode==event->xkey.keycode	    && (/*wKeyBindings[i].modifier==0 		||*/ wKeyBindings[i].modifier==modifiers)) {	    command = i;	    break;	}    }        if (command < 0) {	if (!wRootMenuPerformShortcut(event)) {	    static int dontLoop = 0;	    	    if (dontLoop > 10) {		wwarning("problem with key event processing code");		return;	    }	    dontLoop++;	    /* if the focused window is an internal window, try redispatching	     * the event to the managed window, as it can be a WINGs window */	    if (wwin && wwin->flags.internal_window		&& wwin->client_leader!=None) {		/* client_leader contains the WINGs toplevel */		event->xany.window = wwin->client_leader;		WMHandleEvent(event);	    }	    dontLoop--;	}	return;    }#define ISMAPPED(w) ((w) && !(w)->flags.miniaturized && ((w)->flags.mapped || (w)->flags.shaded))#define ISFOCUSED(w) ((w) && (w)->flags.focused)    switch (command) {     case WKBD_ROOTMENU:	OpenRootMenu(scr, event->xkey.x_root, event->xkey.y_root, True);	break;     case WKBD_WINDOWMENU:	if (ISMAPPED(wwin) && ISFOCUSED(wwin))	    OpenWindowMenu(wwin, wwin->frame_x, 			   wwin->frame_y+wwin->frame->top_width, True);	break;     case WKBD_WINDOWLIST:	OpenSwitchMenu(scr, event->xkey.x_root, event->xkey.y_root, True);	break;     case WKBD_MINIATURIZE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {	    CloseWindowMenu(scr);	    	    if (wwin->protocols.MINIATURIZE_WINDOW)	      	wClientSendProtocol(wwin, _XA_GNUSTEP_WM_MINIATURIZE_WINDOW,				    event->xbutton.time);	    else {		if (!wwin->window_flags.no_miniaturizable)		    wIconifyWindow(wwin);	    }	}	break;     case WKBD_HIDE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {	    WApplication *wapp = wApplicationOf(wwin->main_window);	    CloseWindowMenu(scr);	    	    if (wapp && !wapp->main_window_desc->window_flags.no_appicon) {		wHideApplication(wapp);	    }	}	break;     case WKBD_MAXIMIZE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin) 	    && !wwin->window_flags.no_resizable) {	    CloseWindowMenu(scr);	    	    if (wwin->flags.maximized) {		wUnmaximizeWindow(wwin);	    } else {		wMaximizeWindow(wwin, MAX_VERTICAL|MAX_HORIZONTAL);	    }	}	break;     case WKBD_VMAXIMIZE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)	    && !wwin->window_flags.no_resizable) {	    CloseWindowMenu(scr);	    	    if (wwin->flags.maximized) {		wUnmaximizeWindow(wwin);	    } else {		wMaximizeWindow(wwin, MAX_VERTICAL);	    }	}	break;     case WKBD_RAISE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {	    CloseWindowMenu(scr);	    	    wRaiseFrame(wwin->frame->core);	}	break;     case WKBD_LOWER:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {	    CloseWindowMenu(scr);	    wLowerFrame(wwin->frame->core);	}	break;     case WKBD_RAISELOWER:	/* raise or lower the window under the pointer, not the	 * focused one 	 */	wwin = windowUnderPointer(scr);	if (wwin)	    wRaiseLowerFrame(wwin->frame->core);	break;     case WKBD_SHADE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)	    && !wwin->window_flags.no_shadeable) {	    if (wwin->flags.shaded)		wUnshadeWindow(wwin);	    else		wShadeWindow(wwin);	}	break;     case WKBD_CLOSE:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)	    && !wwin->window_flags.no_closable) {	    CloseWindowMenu(scr);	    if (wwin->protocols.DELETE_WINDOW)	      wClientSendProtocol(wwin, _XA_WM_DELETE_WINDOW,				  event->xkey.time);	}	break;    case WKBD_SELECT:	if (ISMAPPED(wwin) && ISFOCUSED(wwin)) {	    wSelectWindow(wwin);	}        break;     case WKBD_FOCUSNEXT:	wwin = NextFocusWindow(scr);        if (wwin != NULL) {            wSetFocusTo(scr, wwin);            if (wPreferences.circ_raise)                wRaiseFrame(wwin->frame->core);        }	break;     case WKBD_FOCUSPREV:	wwin = PrevFocusWindow(scr);        if (wwin != NULL) {            wSetFocusTo(scr, wwin);            if (wPreferences.circ_raise)                wRaiseFrame(wwin->frame->core);        }	break;#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)#define GOTOWORKS(wk)	case WKBD_WORKSPACE##wk:\			i = (scr->current_workspace/10)*10 + wk - 1;\			if (wPreferences.ws_advance || i<scr->workspace_count)\			    wWorkspaceChange(scr, i);\			break#else#define GOTOWORKS(wk)	case WKBD_WORKSPACE/**/wk:\			i = (scr->current_workspace/10)*10 + wk - 1;\			if (wPreferences.ws_advance || i<scr->workspace_count)\			    wWorkspaceChange(scr, i);\			break#endif    GOTOWORKS(1);    GOTOWORKS(2);    GOTOWORKS(3);    GOTOWORKS(4);    GOTOWORKS(5);    GOTOWORKS(6);    GOTOWORKS(7);    GOTOWORKS(8);    GOTOWORKS(9);    GOTOWORKS(10);#undef GOTOWORKS     case WKBD_NEXTWORKSPACE:	if (scr->current_workspace < scr->workspace_count-1)            wWorkspaceChange(scr, scr->current_workspace+1);        else if (scr->current_workspace == scr->workspace_count-1) {            if (wPreferences.ws_advance &&                scr->current_workspace < MAX_WORKSPACES-1)                wWorkspaceChange(scr, scr->current_workspace+1);            else if (wPreferences.ws_cycle)                wWorkspaceChange(scr, 0);        }	break;     case WKBD_PREVWORKSPACE:	if (scr->current_workspace > 0)	    wWorkspaceChange(scr, scr->current_workspace-1);        else if (scr->current_workspace==0 && wPreferences.ws_cycle)            wWorkspaceChange(scr, scr->workspace_count-1);	break;	     case WKBD_NEXTWSLAYER:     case WKBD_PREVWSLAYER:	{	    int row, column;	    	    row = scr->current_workspace/10;	    column = scr->current_workspace%10;	    	    if (command==WKBD_NEXTWSLAYER) {		if ((row+1)*10 < scr->workspace_count)		    wWorkspaceChange(scr, column+(row+1)*10);	    } else {		if (row > 0)		    wWorkspaceChange(scr, column+(row-1)*10);	    }	}	break;    case WKBD_CLIPLOWER:        if (!wPreferences.flags.noclip)            wDockLower(scr->workspaces[scr->current_workspace]->clip);        break;     case WKBD_CLIPRAISE:        if (!wPreferences.flags.noclip)            wDockRaise(scr->workspaces[scr->current_workspace]->clip);        break;     case WKBD_CLIPRAISELOWER:        if (!wPreferences.flags.noclip)            wDockRaiseLower(scr->workspaces[scr->current_workspace]->clip);        break;    }}