move the input-related code out of the camera and into its own file