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