Use keydown for key press detection in chat.

Fixes tab completion in Chrome. Closes #45.