keyboardThread.restartRunning();
keyboardThread.start();
	public  void setInputDeviceNum (int port) throws Exception {		if (port == currentInPort) return;		currentInPort=port;        /*        if (inStream[port]==null)        { File file = new java.io.File( (String) midiDevList.get(port));          RandomAccessFile pipe = new java.io.RandomAccessFile(file , "rw");          outStream[port] = new java.io.FileOutputStream( pipe.getFD() );          outStream[port] = new BufferedOutputStream( outStream[port] ,4100);          inStream[port] = new java.io.FileInputStream( pipe.getFD() );        }         */		 // thread.stop() is deprecated. I switched this to thread.stopRunning		keyboardThread.stopRunning();		readPos=writePos;        //thread = new Thread(keyboardThread);		keyboardThread.restartRunning();	}