rem: notif = WMCreateNotification(WMTextDidEndEditingNotification, tPtr, (void*)WMTabTextMovement);
context: handleTextFieldKeyPress(TextField *tPtr, XEvent *event){    char buffer[64];    KeySym ksym;    int count, refresh = 0;    int control_pressed = 0;    int changed;    WMNotification *notif;    WMScreen *scr = tPtr->view->screen;    changed = 0;    if (((XKeyEvent *) event)->state & WM_EMACSKEYMASK) {	control_pressed = 1;    }    count = XLookupString(&event->xkey, buffer, 63, &ksym, NULL);    buffer[count] = '\0';    switch (ksym) {     case XK_Tab:	if (event->xkey.state & ShiftMask) {	    notif = WMCreateNotification(WMTextDidEndEditingNotification,					 tPtr, (void*)WMBacktabTextMovement);	    if (tPtr->view->prevFocusChain) {		W_SetFocusOfTopLevel(W_TopLevelOfView(tPtr->view),				     tPtr->view->prevFocusChain);		tPtr->flags.notIllegalMovement = 1;	    }	} else {	    notif = WMCreateNotification(WMTextDidEndEditingNotification,					 tPtr, (void*)WMTabTextMovement);	    if (tPtr->view->nextFocusChain) {		W_SetFocusOfTopLevel(W_TopLevelOfView(tPtr->view),				 tPtr->view->nextFocusChain);		tPtr->flags.notIllegalMovement = 1;	    }	}	WMPostNotification(notif);	WMReleaseNotification(notif);	break;	     case XK_Return:	WMPostNotificationName(WMTextDidEndEditingNotification, tPtr,                               (void*)WMReturnTextMovement);	break;     case WM_EMACSKEY_LEFT:	if (!control_pressed) {	    goto normal_key;	}     case XK_KP_Left:     case XK_Left:	if (tPtr->cursorPosition > 0) {	    paintCursor(tPtr);	    tPtr->cursorPosition--;	    if (tPtr->cursorPosition < tPtr->viewPosition) {		tPtr->viewPosition = tPtr->cursorPosition;		refresh = 1;	    } else {		paintCursor(tPtr);	    }	}	break;    case WM_EMACSKEY_RIGHT:      if (!control_pressed) {	goto normal_key;      }    case XK_KP_Right:     case XK_Right:	if (tPtr->cursorPosition < tPtr->textLen) {	    paintCursor(tPtr);	    tPtr->cursorPosition++;	    while (WMWidthOfString(scr->normalFont,				&(tPtr->text[tPtr->viewPosition]),				tPtr->cursorPosition-tPtr->viewPosition)		   > tPtr->usableWidth) {		tPtr->viewPosition++;		refresh = 1;	    }	    if (!refresh)		paintCursor(tPtr);	}	break;	    case WM_EMACSKEY_HOME:      if (!control_pressed) {	goto normal_key;      }    case XK_KP_Home:     case XK_Home:	if (tPtr->cursorPosition > 0) {	    paintCursor(tPtr);	    tPtr->cursorPosition = 0;	    if (tPtr->viewPosition > 0) {		tPtr->viewPosition = 0;		refresh = 1;	    } else {		paintCursor(tPtr);	    }	}	break;	    case WM_EMACSKEY_END:      if (!control_pressed) {	goto normal_key;      }     case XK_KP_End:     case XK_End:	if (tPtr->cursorPosition < tPtr->textLen) {	    paintCursor(tPtr);	    tPtr->cursorPosition = tPtr->textLen;	    tPtr->viewPosition = 0;	    while (WMWidthOfString(scr->normalFont,				   &(tPtr->text[tPtr->viewPosition]),				   tPtr->textLen-tPtr->viewPosition)		   >= tPtr->usableWidth) {		tPtr->viewPosition++;		refresh = 1;	    }	    if (!refresh)		paintCursor(tPtr);	}	break;	     case WM_EMACSKEY_BS:      if (!control_pressed) {	goto normal_key;      }     case XK_BackSpace:	if (tPtr->cursorPosition > 0) {	    WMRange range;	    changed = 1;	    range.position = tPtr->cursorPosition-1;	    range.count = 1;	    WMDeleteTextFieldRange(tPtr, range);	}	break;	    case WM_EMACSKEY_DEL:      if (!control_pressed) {	goto normal_key;      }    case XK_KP_Delete:     case XK_Delete:	if (tPtr->cursorPosition < tPtr->textLen) {	    WMRange range;	    changed = 1;	    range.position = tPtr->cursorPosition;	    range.count = 1;	    WMDeleteTextFieldRange(tPtr, range);	}	break;    normal_key:     default:	if (count > 0 && !iscntrl(buffer[0])) {	    changed = 1;	    WMInsertTextFieldText(tPtr, buffer, tPtr->cursorPosition);	}    }    if (refresh) {	paintTextField(tPtr);    }        if (changed) {	WMPostNotificationName(WMTextDidChangeNotification, tPtr, NULL);    }}