How can I add/delete characters in a text area via javascript. Suppose I am taking the input via an onscreen keypad. I need to simulate as many keys as possible such as backspace, del, enter. The more challenging task is to maintain a pseudo-cursor for the textarea and move the cursor as input is received from the keypad.
So if I press the left arrow and I have a track of the pseudo cursor then I need to move the cursor one position back and then insert/delete characters from that position.
I hope I have made myself clear. Any help is appreciated.