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 __init__(
      self,
      key_processor_ref: weakref.ReferenceType[KeyProcessor],
      arg: str | None,
      key_sequence: list[KeyPress],
      previous_key_sequence: list[KeyPress],
      is_repeat: bool,
  ) -> None:
      self._key_processor_ref = key_processor_ref
      self.key_sequence = key_sequence
      self.previous_key_sequence = previous_key_sequence
  
      #: True when the previous key sequence was handled by the same handler.
      self.is_repeat = is_repeat
  
      self._arg = arg
      self._app = get_app()
  
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 1 to create a new KeyPressEvent object  with example: obj = KeyPressEvent(key_processor_ref, arg, key_sequence, previous_key_sequence, is_repeat)