I often find myself typing "aaaaaaaa" or "dddddddd" into the chat boxes, when of course I mean to be moving my character left or right. When I do this, I then have to select the text, delete it, then click or tab back to the game window.
I suggest that if we type "aaaaaaaa" or "dddddddd" into the chat box, it detects this, automatically deletes it, and moves focus back to the game window. No one should be typing this into chat, and it will save people a lot of grief.