MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / mouse_event

Method mouse_event

mitmproxy/tools/console/window.py:285–300  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

283 self.refresh()
284
285 def mouse_event(self, *args, **kwargs):
286 # args: (size, event, button, col, row)
287 k = super().mouse_event(*args, **kwargs)
288 if not k:
289 if args[1] == "mouse drag":
290 signals.status_message.send(
291 message="Hold down fn, shift, alt or ctrl to select text or use the --set console_mouse=false parameter.",
292 expire=1,
293 )
294 elif args[1] == "mouse press" and args[2] == 4:
295 self.keypress(args[0], "up")
296 elif args[1] == "mouse press" and args[2] == 5:
297 self.keypress(args[0], "down")
298 else:
299 return False
300 return True
301
302 def keypress(self, size, k):
303 k = super().keypress(size, k)

Callers 1

mouse_eventMethod · 0.45

Calls 2

keypressMethod · 0.95
sendMethod · 0.45

Tested by

no test coverage detected