moves KeyPress to a separate file and makes ViewController use it