def on_keystroke_handler(key):
    self.awaiting_keystroke = False
    self.terminal_controller.remove_any_key_handler()
    callback(*(args + (key,)))
def on_keystroke_handler(key):
    self.awaiting_keystroke = False
    self.terminal_controller.remove_any_key_handler()
    callback(*(args + (key,)))