def METHOD_NAME(self) -> list[KeyPress]:
    "Read list of KeyPress."
    # Return result.
    result = self._buffer
    self._buffer = []
    # Reset event.
    if not self._closed:
        # (If closed, the event should not reset.)
        windll.kernel32.ResetEvent(self._event)
    return result