if(event.character == SWT.CR){ Event forwardEvent = new Event(); forwardEvent.item = getLastFocus(); notifyListeners(SWT.DefaultSelection, forwardEvent); }
void keyDown(Event event) {	boolean isCtrlSelection = isCtrlSelection();		if (event.stateMask != SWT.CTRL) {		isCtrlSelection = false;	}	switch (event.keyCode) {		case SWT.ARROW_UP:			doArrowUp(event.stateMask);			break;		case SWT.ARROW_DOWN:			doArrowDown(event.stateMask);			break;		case SWT.ARROW_LEFT:			doArrowLeft(event.stateMask);			break;		case SWT.ARROW_RIGHT:			doArrowRight(event.stateMask);			break;					case SWT.PAGE_UP:			doPageUp(event.stateMask);			break;				case SWT.PAGE_DOWN:			doPageDown(event.stateMask);			break;		case SWT.HOME:			doHome(event.stateMask);			break;		case SWT.END:			doEnd(event.stateMask);			break;		default:										// no selection occurred, keep previous 			isCtrlSelection = isCtrlSelection();		// selection type information	}	if (event.character == ' ') {		doSpace(event.stateMask);		isCtrlSelection = (event.stateMask == SWT.CTRL);	}	setCtrlSelection(isCtrlSelection);}