Fixed keyboard input support. Closes #143.