MCPcopy
hub / github.com/mitmproxy/mitmproxy / keypress

Method keypress

mitmproxy/tools/console/commands.py:91–101  ·  view source on GitHub ↗
(self, size: int, key: str)

Source from the content-addressed store, hash-verified

89 super().__init__(self.walker)
90
91 def keypress(self, size: int, key: str):
92 if key == "m_select":
93 foc, idx = self.get_focus()
94 signals.status_prompt_command.send(partial=foc.cmd.name + " ")
95 elif key == "m_start":
96 self.set_focus(0)
97 self.walker._modified()
98 elif key == "m_end":
99 self.set_focus(len(self.walker.cmds) - 1)
100 self.walker._modified()
101 return super().keypress(size, key)
102
103
104class CommandHelp(urwid.Frame):

Callers

nothing calls this directly

Calls 5

_modifiedMethod · 0.80
get_focusMethod · 0.45
sendMethod · 0.45
set_focusMethod · 0.45
keypressMethod · 0.45

Tested by

no test coverage detected