I am working on an application in which I use a special Urdu keyboard , its work is great, but the problem is that when I type any word, for example. (سلام), the cursor does not work in the middle of a character, for example, cut / copy / paste or delete (ا) a character from the middle of a word does not work. I use a crude technique, just adding characters, but it also works great.
To write any letters
private void addText(View v) { // String b = ""; // b = (String) v.getTag(); // urdu_word.setText(b); if (isEdit == true) { String b = ""; b = (String) v.getTag(); if (b != null) { Log.i("buttonsOnclick", b); // adding text in Edittext mEt.append(b); } } }
To press the back button
private void isBack(View v) { if (isEdit == true) { CharSequence cc = mEt.getText(); if (cc != null && cc.length() > 0) { { mEt.setText(""); mEt.append(cc.subSequence(0, cc.length() - 1)); } } } }
Here's a screenshot to clear my problem for you. 
I used a large library and code from github but didn't catch a good idea
1) Keyboard-1 
2) Keyboard-2 
3) Keyboard-3 
4) Keyboard-4
I checked all of these keyboards and much more from libs, had the same cursor problem how to fully control my user keyboard by removing the character from the middle and copying my copied text copy like a normal keyboard with EditText, in advance all of you in advance :)

source share