Code example for InputConnection

Methods: deleteSurroundingText

0
		Log.d("Stroke5IME", "Stroke5->backspace");
		if( mComposing.length() > 0 ) { 
			mComposing.deleteCharAt(mComposing.length()-1); 
			mInputConnection.setComposingText(mComposing, mComposing.length());
		} else {  
			mInputConnection.deleteSurroundingText(1,0);
		} 
	} 
 
	/* Handle the onKey from the virtual keyboard. */ 
 
	@Override public void onKey(int primaryCode, int[] keyCodes) {
		Log.d("Stroke5IME", "onKey - KeyCode ="+primaryCode +" "+ keyCodes[0] );
		mInputConnection = getCurrentInputConnection();
		switch( primaryCode ){
			case KeyEvent.KEYCODE_N:
			case 110: 
			case KeyEvent.KEYCODE_M:
			case 109: 
			case KeyEvent.KEYCODE_COMMA:
			case 44: