Control focus= getFocusControl();
Control focus= getFocusControl(); if (focus == null || focus.handle == 0) return OS.eventNotHandledErr;  int w= OS.GetControlOwner(focus.handle); if (w != OS.FrontWindow()) return OS.eventNotHandledErr;
	private int handleTextCallback(int nextHandler, int eRefHandle) {				int eventClass= OS.GetEventClass(eRefHandle);		int eventKind= OS.GetEventKind(eRefHandle);				switch (eventClass) {		case OS.kEventClassTextInput:			switch (eventKind) {			case OS.kEventTextInputUnicodeForKeyEvent:				return OS.eventNotHandledErr;			default:				System.out.println("Display.handleTextCallback: kEventClassTextInput: unexpected event kind");				break;			}			break;		case OS.kEventClassKeyboard:			Control focus= getFocusControl();				switch (eventKind) {			case OS.kEventRawKeyDown:				if (MacEvent.getKeyCode(eRefHandle) == 122) {					int handle= 0;					if (focus != null)						handle= focus.handle;					windowProc(handle, SWT.Help, null);					return OS.kNoErr;				}			case OS.kEventRawKeyRepeat:				if (focus != null)					return focus.sendKeyEvent(SWT.KeyDown, nextHandler, eRefHandle);				break;			case OS.kEventRawKeyUp:				if (focus != null)					return focus.sendKeyEvent(SWT.KeyUp, nextHandler, eRefHandle);				break;			default:				System.out.println("Display.handleTextCallback: kEventClassKeyboard: unexpected event kind");				break;			}			break;		default:			System.out.println("Display.handleTextCallback: unexpected event class");			break;		}		return OS.eventNotHandledErr;	}