class_docstr: Key press event, delivered to key bindings.
  
  :param key_processor_ref: Weak reference to the `KeyProcessor`.
  :param arg: Repetition argument.
  :param key_sequence: List of `KeyPress` instances.
  :param previouskey_sequence: Previous list of `KeyPress` instances.
  :param is_repeat: True when the previous event was delivered to the same handler.
code: def key_processor(self) -> KeyProcessor:
      processor = self._key_processor_ref()
      if processor is None:
          raise Exception(
              "KeyProcessor was lost. This should not happen."
          )
      return processor
  
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 4 for calling the KeyPressEvent obj's underlying member method code with example usage: obj.key_processor() and returns: processor