Look for the slim bar along the bottom of the game window. Click it, or press the / key, and a chat box opens where you can type.
If typing is disabled in that game, there is a small speech bubble icon off to the side containing a set of premade messages. Click it and pick a line — it gets the job done without a keyboard.