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

Method keypress

mitmproxy/tools/console/window.py:39–49  ·  view source on GitHub ↗
(self, size, key)

Source from the content-addressed store, hash-verified

37 return super().mouse_event(size, event, button, col, row, focus)
38
39 def keypress(self, size, key):
40 # Make sure that we don't propagate cursor events outside of the widget.
41 # Otherwise, in a horizontal layout, urwid's Pile would change the focused widget
42 # if we cannot scroll any further.
43 ret = super().keypress(size, key)
44 command = self._command_map[
45 ret
46 ] # awkward as they don't implement a full dict api
47 if command and command.startswith("cursor"):
48 return None
49 return ret
50
51
52class WindowStack:

Callers

nothing calls this directly

Calls 1

keypressMethod · 0.45

Tested by

no test coverage detected