public void keyFunctionMap(char key,boolean alt) {
		Event event;
		event=getLastEvent();
		switch(key) {// unused letters so far: AjJLQXYZ
		case 'v': // edit osc msg value 
			if (event!=null) {
				inputMode="v";
				//int numSlider=0;
				if ((editValueIndex>-1) ) {
					while (editValueIndex>=event.value.size()) {event.value.add("");}
					inputStr=""+event.value.get(editValueIndex);
					editValueVector=event.value;
				} else {
					inputStr=event.getValueStr();
					//numSlider=slidersDraw.makeSliders(event.getValue());
				}
				//if (numSlider>0) {
					//slidersDraw.setTitle(event.oscMsgName);
					//slidersDraw.setVisible(true);
				//} else {
					//slidersDraw.setVisible(false);
				//}
			}
//			
			break;
		case 'V':inputMode="V";break;// set value index to edit.
		case 'T':inputMode="T";
		 				if ( timeLineObject.parameters.size()<editValueIndex) {editValueIndex=-1;}
						if (editValueIndex>-1 ) {inputStr=""+timeLineObject.parameters.get(editValueIndex);}
						else {inputStr=Event.getValueStr(timeLineObject.parameters);}
						break;
		case 'U':if (alt){clearUndo();} else  {undoOn=!undoOn;}break;// set value index to edit.
		case 'u':if (alt) {redo();} else {undo();};break;// loop
		case 'e': inputStr=(event!=null) ?event.getTargetId():""; inputMode="e"; break;// time line trigger
		case 'E': inputStr=""; inputMode="E"; break; // clear timeline
		case 'i':  inputMode="i";break;// enter osc message
		case 'J':  inputStr=""+this.interfaceFile;inputMode="J";break;// enter osc message
		case '/': inputStr=(event!=null) ?event.oscMsgName:"/"; inputMode="/";break;// enter osc message
		case 'f': inputStr=dataFilePath+fileName;inputMode="f";break;// enter filename
		case 'F': inputStr=dataFilePath+fileName;inputMode="F";break;// add timelines from filename
		case 's': fileUtil.save(this.fileName);break;// save timeline
		case 'S': inputMode="S";break;// save timeline
		case 'o': clearUndo();		fileUtil.open();break;
		case 'O': inputMode="O";break;// view del object list
		case 't': inputStr=""+timeLineObject.timeLineLength;inputMode="t";break;//enter  time line length
		case 'q': inputStr=""+timeLineObject.quantize;inputMode="q";break;// quantize
		case 'M':inputStr=""+timeLineObject.oscIndex; inputMode="M";break;// timeline osc sender index
		case 'm':inputStr=""+((event!=null) ?""+event.oscIndex:""); inputMode="m";break;// osc sender index
		case 'n': //timeline name / (alt) event name
			if (!alt) {
				inputStr=""+timeLineObject.id;inputMode="n";
			} else {
				if (getLastEvent() !=null) {inputStr=""+getLastEvent().id;inputMode="ne";}
			} break;// timeline/event name
		case 'b': inputStr=""+timeLineObject.beatLength+"-"+timeLineObject.beatPerBar;inputMode="b";break;// beat length in quantisation points.
		case 'B': inputStr=""+calcUtil.calculateBPM(timeLineObject);inputMode="B";break;// beat length in quantisation points.
		case 'w': 
			// 5/10/06 : changed to set pitch.
			inputMode="w";
			inputStr=""+timeLineObject.pitch;
			//Vector v = new Vector();
			//v.add(new Float(timeLineObject.pitch));
//			slidersDraw.makeSliders(v);
//			slidersDraw.setTitle("pitch:"+timeLineObject.id);
//			slidersDraw.setVisible(true);
			break;// set pitch
		case 'W': inputMode="W";break; // normalise timeline time on pitch i.e. resize timeline so pitch is 1.
		case 'k': inputStr=""+timeLineObject.getColorStr();inputMode="k";break;// set color.
		case 'K': if (alt) {this.oscMessageColorMap.clear();this.expressionColorMap.clear();} else {inputMode="K";} break;// set color maps.
		
		case 'd': inputMode="d";break;// delete current event
		case 'D': inputMode="D";break;// delete current timeliine
		case 'N': inputMode="N";break;// new note.
		case 'g': 
			if (alt) { selectSameEvents(); } 
			else { addRemoveSelection(); }  
			break;
		case 'G':selectDeselectAll();break; //selects all if all arent selected.
		case 7:inputMode="g";break; // ctrl+g - input group name
		case 'l':  togglePlayMode("l");break;// toggle loop
		case 'p': togglePlayMode("p");break;// toggle play
		case 'P': togglePlayMode("P");break;//stop all play
		case 'r': if (alt) {inputMode="r";inputStr=this.recordInput;} else { togglePlayMode("r");} break;// record , if alt then enter OSC Msg / MIDI device input for recording
		case 'R': inputStr=""+this.recordGranularity;inputMode="R";
		case '0': timeLineObject.setPosAndNextEvent(-1);break;
		case 'c': copyEvent();break;
		case 'C': copyTimeLine();break;
		case 'z': prevTimeLine();break;
		case 'x': nextTimeLine();break;
		case '`': gotoChildTimeLine();break;
		case '~': gotoParentTimeLine();break;
		case ')': gotoRootTimeLine();break;
		case 'a': 
			if (!timeLineObject.selection.contains(event) && (timeLineObject.selection.size()>0)) {event = (Event)timeLineObject.selection.get(0);}
			if (event!=null) {setEventSelection(Event.FIELD_ACTIVE, new Boolean(!event.active), timeLineObject.selection);} 	
			break;
		case 1: if (event!=null) {toggleActivateSameEvents( event ); } 	break;
		case '*':  timeLineObject.rebuildTimeLine(); 	break;
		case '+': inputMode="+";break;// input midi note range mapping.
		case '=': inputMode="=";break;// input midi control mapping.
		case ' ': // trigger event
			playEvent(event);
			break;
		case 'y': inputMode="y";break;// filter input.
		case 'I': inputMode="I";inputStr=timeLineObject.followOnExpr;break;// set follow on expression.
		case 3: saveUndo();copyEvents(); break;// copy selected events
		case 22:saveUndo();pasteEvents();break;// paste copied events
		case 'h':inputMode="h";break;// edit map id
		case 'H':inputMode="H";break;// delete map
		case 'X': inputMode="X";break;// view del keymap list
		case '1':if (alt) {inputMode="1";} else {midiUtil.setMaps(key);}break;//  1 - keymap
		case '2':if (alt) {inputMode="2";} else {midiUtil.setMaps(key);}break;//  2 - keymap
		case '3':if (alt) {inputMode="3";} else {midiUtil.setMaps(key);}break;//  3 - keymap
		case '4':if (alt) {inputMode="4";} else {midiUtil.setMaps(key);}break;//  4 - keymap
		case '5':if (alt) {inputMode="5";} else {midiUtil.setMaps(key);}break;//  5 - keymap
		case '6':if (alt) {inputMode="6";} else {midiUtil.setMaps(key);}break;//  6 - keymap
		case '7':if (alt) {inputMode="7";} else {midiUtil.setMaps(key);}break;//  7 - keymap
		case '8':if (alt) {inputMode="8";} else {midiUtil.setMaps(key);}break;//  8 - keymap
		case '9':if (alt) {inputMode="9";} else {midiUtil.setMaps(key);}break;//  9 - keymap
		}
	}