Stop drawing when the escape key is pressed