Added KeyEvent handling to mainwindow to handle user interruptions:
left, right, esc