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: Callback to handler.
docstr_tok: ["Callback","to","handler","."]
code: def _call_handler(
      self, key: str | Keys | tuple[Keys, ...], insert_text: str
  ) -> None:
      """
      Callback to handler.
      """
      if isinstance(key, tuple):
          # Received ANSI sequence that corresponds with multiple keys
          # (probably alt+something). Handle keys individually, but only pass
          # data payload to first KeyPress (so that we won't insert it
          # multiple times).
          for i, k in enumerate(key):
              self._call_handler(k, insert_text if i == 0 else "")
      else:
          if key == Keys.BracketedPaste:
              self._in_bracketed_paste = True
              self._paste_buffer = ""
          else:
              self.feed_key_callback(KeyPress(key, insert_text))
  
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 6 for calling the Vt100Parser obj's underlying member method code with example usage: obj._call_handler(key, insert_text) without return types