class_docstr: Statemachine that receives :class:`KeyPress` instances and according to the
  key bindings in the given :class:`KeyBindings`, calls the matching handlers.
  
  ::
  
      p = KeyProcessor(key_bindings)
  
      # Send keys into the processor.
      p.feed(KeyPress(Keys.ControlX, ''))
      p.feed(KeyPress(Keys.ControlC, '')
  
      # Process all the keys in the queue.
      p.process_keys()
  
      # Now the ControlX-ControlC callback will be called if this sequence is
      # registered in the key bindings.
  
  :param key_bindings: `KeyBindingsBase` instance.
docstr: Start auto flush timeout. Similar to Vim's `timeoutlen` option.
  
  Start a background coroutine with a timer. When this timeout expires
  and no key was pressed in the meantime, we flush all data in the queue
  and call the appropriate key binding handlers.
docstr_tok: ["Start","auto","flush","timeout",".","Similar","to","Vim","'s","`","timeoutlen","`","option",".","Start","a","background","coroutine","with","a","timer",".","When","this","timeout","expires","and","no","key","was","pressed","in","the","meantime",",","we","flush","all","data","in","the","queue","and","call","the","appropriate","key","binding","handlers","."]
code: def _start_timeout(self) -> None:
      """
      Start auto flush timeout. Similar to Vim's `timeoutlen` option.
  
      Start a background coroutine with a timer. When this timeout expires
      and no key was pressed in the meantime, we flush all data in the queue
      and call the appropriate key binding handlers.
      """
      app = get_app()
      timeout = app.timeoutlen
  
      if timeout is None:
          return
  
      async def wait() -> None:
          "Wait for timeout."
          # This sleep can be cancelled. In that case we don't flush.
          await sleep(timeout)
  
          if len(self.key_buffer) > 0:
              # (No keys pressed in the meantime.)
              flush_keys()
  
      def flush_keys() -> None:
          "Flush keys."
          self.feed(_Flush)
          self.process_keys()
  
      # Automatically flush keys.
      if self._flush_wait_task:
          self._flush_wait_task.cancel()
      self._flush_wait_task = app.create_background_task(wait())
  
imports: from __future__ import annotations
  import weakref
  from asyncio import Task, sleep
  from collections import deque
  from typing import TYPE_CHECKING, Any, Generator
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.enums import EditingMode
  from prompt_toolkit.filters.app import vi_navigation_mode
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.utils import Event
  from .key_bindings import Binding, KeyBindingsBase
label_desc: Use image node_id 13 for calling the KeyProcessor obj's underlying member method code with example usage: obj._start_timeout() without return types