Called when the window receives a keyboard event.
Inserts the character into the buffer (or interprets keyboard movement commands).