This.
It's usually what throws people when they plug in a USB keyboard and then it doesn't work. It does, but I believe that the standard setting has Direct Chat turned off, meaning the keyboard is used for controlling the character.
Turn Direct Chat on, and whenever you press a key, it'll automatically start typing in the chat box.
Took me a while to work it out, but yeah, there it is.