case 30 /* OS.GDK_Escape:
case 53 /* OS.GDK_Escape:
boolean translateTraversal (MacEvent mEvent) {		int kind= mEvent.getKind();	if (kind != OS.kEventRawKeyDown && kind != OS.kEventRawKeyRepeat)		return false;	int detail = SWT.TRAVERSE_NONE;	/* AW	GdkEventKey keyEvent = new GdkEventKey ();	OS.memmove (keyEvent, gdkEvent, GdkEventKey.sizeof);	int key = keyEvent.keyval;	int code = traversalCode (key, gdkEvent);	int [] state = new int [1];	OS.gdk_event_get_state (gdkEvent, state);	*/	int code= traversalCode ();	int key= mEvent.getKeyCode();	int state= mEvent.getStateMask();	boolean all = false;	switch (key) {		case 30 /* OS.GDK_Escape:		case OS.GDK_Cancel */: {			all = true;			detail = SWT.TRAVERSE_ESCAPE;			break;		}		case 36 /* OS.GDK_Return */ : {			all = true;			detail = SWT.TRAVERSE_RETURN;			break;		}		//case OS.GDK_ISO_Left_Tab: 		case 48 /* OS.GDK_Tab */ : {			boolean next = (state & SWT.SHIFT) == 0;			/*			* NOTE: This code causes Shift+Tab and Ctrl+Tab to			* always attempt traversal which is not correct.			* The default should be the same as a plain Tab key.			* This behavior is currently relied on by StyledText.			* 			* The correct behavior is to give every key to any			* control that wants to see every key.  The default			* behavior for a Canvas should be to see every key.			*/			/* AW			switch (state [0]) {				case OS.GDK_SHIFT_MASK:				case OS.GDK_CONTROL_MASK:					code |= SWT.TRAVERSE_TAB_PREVIOUS | SWT.TRAVERSE_TAB_NEXT;			}			*/			detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS;			break;		}		case 126: // OS.GDK_Up:		case 123: // OS.GDK_Left:			detail = SWT.TRAVERSE_ARROW_PREVIOUS;			break;					case 125: // OS.GDK_Down:		case 124: /* OS.GDK_Right: */			detail = SWT.TRAVERSE_ARROW_NEXT;			break;					case 116: // OS.GDK_Page_Up:		case 121: /* OS.GDK_Page_Down: */ {			all = true;			/* AW			if ((state [0] & OS.GDK_CONTROL_MASK) == 0) return false;			*/			/*			* NOTE: This code causes Ctrl+PgUp and Ctrl+PgDn to always			* attempt traversal which is not correct.  This behavior is			* currently relied on by StyledText.			* 			* The correct behavior is to give every key to any			* control that wants to see every key.  The default			* behavior for a Canvas should be to see every key.			*/			code |= SWT.TRAVERSE_PAGE_NEXT | SWT.TRAVERSE_PAGE_PREVIOUS;			detail = key == 121 ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS;			break;		}		default:			return false;	}		Event event = new Event ();	event.doit = (code & detail) != 0;	event.detail = detail;	/* AW	event.time = keyEvent.time;	setInputState (event, gdkEvent);	*/	Shell shell = getShell ();	Control control = this;	do {		if (control.traverse (event)) return true;		if (!event.doit && control.hooks (SWT.Traverse)) {			return false;		}		if (control == shell) return false;		control = control.parent;	} while (all && control != null);	return false;}