warn_press_key() function was not timing out, waiting indefinitely