Use keydown for key press detection in chat.

Fixes tab completion in Chrome. Closes #45.

Not tested in anything else than Chrome, but both Enter and Tab works fine there.