class_docstr: :param recognize_paste: When True, try to discover paste actions and turn
      the event into a BracketedPaste.
docstr: Generator that yields `KeyPress` objects from the input records.
docstr_tok: ["Generator","that","yields","`","KeyPress","`","objects","from","the","input","records","."]
code: def _get_keys(
      self, read: DWORD, input_records: Array[INPUT_RECORD]
  ) -> Iterator[KeyPress]:
      """
      Generator that yields `KeyPress` objects from the input records.
      """
      for i in range(read.value):
          ir = input_records[i]
  
          # Get the right EventType from the EVENT_RECORD.
          # (For some reason the Windows console application 'cmder'
          # [http://gooseberrycreative.com/cmder/] can return '0' for
          # ir.EventType. -- Just ignore that.)
          if ir.EventType in EventTypes:
              ev = getattr(ir.Event, EventTypes[ir.EventType])
  
              # Process if this is a key event. (We also have mouse, menu and
              # focus events.)
              if isinstance(ev, KEY_EVENT_RECORD) and ev.KeyDown:
                  yield from self._event_to_key_presses(ev)
  
              elif isinstance(ev, MOUSE_EVENT_RECORD):
                  yield from self._handle_mouse(ev)
  
imports: from __future__ import annotations
  import os
  import sys
  from abc import abstractmethod
  from asyncio import get_running_loop
  from contextlib import contextmanager
  from ..utils import SPHINX_AUTODOC_RUNNING
  from ctypes import Array, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from typing import Callable, ContextManager, Iterable, Iterator, TextIO
  from prompt_toolkit.eventloop import run_in_executor_with_context
  from prompt_toolkit.eventloop.win32 import create_win32_event, wait_for_handles
  from prompt_toolkit.key_binding.key_processor import KeyPress
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.mouse_events import MouseButton, MouseEventType
  from prompt_toolkit.win32_types import INPUT_RECORD, KEY_EVENT_RECORD, MOUSE_EVENT_RECORD, STD_INPUT_HANDLE, EventTypes
  from .ansi_escape_sequences import REVERSE_ANSI_SEQUENCES
  from .base import Input
label_desc: Use image node_id 5 for calling the ConsoleInputReader obj's underlying member method code with example usage: obj._get_keys(read, input_records) without return types