I had a similar requirement (twitter style text field). Used onkeyup and onchange. onchange actually takes care of mouse paste operations during lost focus from the field.
[Update] In HTML5 or later, use oninput to get real time character modification updates, as explained in other answers above.