Cleaning up keyPressEvents