Use dumbtty option and catch KeyboardException.