fix #4236 capture keyboard interupt