Malcom,
I think you should be aware that your solution might have some ill-effects, for example if the current caret is not at the end of the text and the current mode is "override" instead of "insert", or if there is some text selected, which will get it deleted. I think both problems can be solved with further kludgetery :)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges