Fix delay with ESC key in terminal