add keyboard interrupt support