class_docstr: :param recognize_paste: When True, try to discover paste actions and turn
      the event into a BracketedPaste.
class_docstr_tok: [":","param","recognize_paste",":","When","True",",","try","to","discover","paste","actions","and","turn","the","event","into","a","BracketedPaste","."]
docstr: Handle mouse events. Return a list of KeyPress instances.
docstr_tok: ["Handle","mouse","events",".","Return","a","list","of","KeyPress","instances","."]
code: def _handle_mouse(self, ev):
      """
      Handle mouse events. Return a list of KeyPress instances.
      """
      FROM_LEFT_1ST_BUTTON_PRESSED = 0x1
  
      result = []
  
      # Check event type.
      if ev.ButtonState == FROM_LEFT_1ST_BUTTON_PRESSED:
          # On a key press, generate both the mouse down and up event.
          for event_type in [
              MouseEventType.MOUSE_DOWN,
              MouseEventType.MOUSE_UP,
          ]:
              data = ";".join(
                  [
                      event_type,
                      str(ev.MousePosition.X),
                      str(ev.MousePosition.Y),
                  ]
              )
              result.append(KeyPress(Keys.WindowsMouseEvent, data))
  
      return result
  
imports: from __future__ import unicode_literals
  from ctypes import windll, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from six.moves import range
  from prompt_toolkit.key_binding.input_processor import KeyPress
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.mouse_events import MouseEventType
  from prompt_toolkit.win32_types import EventTypes, KEY_EVENT_RECORD, MOUSE_EVENT_RECORD, INPUT_RECORD, STD_INPUT_HANDLE
  import msvcrt
  import os
  import sys
  import six
label_desc: Use image node_id 7 for calling the ConsoleInputReader obj's underlying member method code with example usage: obj._handle_mouse(ev) and returns: result