Adding KeyEvents to the application.