Add functional tests for keyboard and mouse input.

This PR fixes #37.