class_docstr: Parser for VT100 input stream.
  Data can be fed through the `feed` method and the given callback will be
  called with KeyPress objects.
  
  ::
  
      def callback(key):
          pass
      i = Vt100Parser(callback)
      i.feed('data...')
  
  :attr feed_key_callback: Function that will be called when a key is parsed.
class_docstr_tok: ["Parser","for","VT100","input","stream",".","Data","can","be","fed","through","the","`","feed","`","method","and","the","given","callback","will","be","called","with","KeyPress","objects",".",":",":","def","callback","(","key",")",":","pass","i","=","Vt100Parser","(","callback",")","i.feed","(","'data\u0001","...","'",")",":","attr","feed_key_callback",":","Function","that","will","be","called","when","a","key","is","parsed","."]
docstr: Flush the buffer of the input stream.
  
  This will allow us to handle the escape key (or maybe meta) sooner.
  The input received by the escape key is actually the same as the first
  characters of e.g. Arrow-Up, so without knowing what follows the escape
  sequence, we don't know whether escape has been pressed, or whether
  it's something else. This flush function should be called after a
  timeout, and processes everything that's still in the buffer as-is, so
  without assuming any characters will follow.
docstr_tok: ["Flush","the","buffer","of","the","input","stream",".","This","will","allow","us","to","handle","the","escape","key","(","or","maybe","meta",")","sooner",".","The","input","received","by","the","escape","key","is","actually","the","same","as","the","first","characters","of","e.g",".","Arrow-Up",",","so","without","knowing","what","follows","the","escape","sequence",",","we","do","n't","know","whether","escape","has","been","pressed",",","or","whether","it","'s","something","else",".","This","flush","function","should","be","called","after","a","timeout",",","and","processes","everything","that","'s","still","in","the","buffer","as-is",",","so","without","assuming","any","characters","will","follow","."]
code: def flush(self) -> None:
      """
      Flush the buffer of the input stream.
  
      This will allow us to handle the escape key (or maybe meta) sooner.
      The input received by the escape key is actually the same as the first
      characters of e.g. Arrow-Up, so without knowing what follows the escape
      sequence, we don't know whether escape has been pressed, or whether
      it's something else. This flush function should be called after a
      timeout, and processes everything that's still in the buffer as-is, so
      without assuming any characters will follow.
      """
      self._input_parser.send(_Flush())
  
imports: from __future__ import annotations
  import re
  from typing import Callable, Dict, Generator
  from ..key_binding.key_processor import KeyPress
  from ..keys import Keys
  from .ansi_escape_sequences import ANSI_SEQUENCES
label_desc: Use image node_id 8 for calling the Vt100Parser obj's underlying member method code with example usage: obj.flush() without return types