add exit by keypressed