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

Method keypress

mitmproxy/tools/console/options.py:260–272  ·  view source on GitHub ↗
(self, size, key)

Source from the content-addressed store, hash-verified

258 return foc.opt.name
259
260 def keypress(self, size, key):
261 if key == "m_next":
262 self.focus_position = (self.focus_position + 1) % len(self.widget_list)
263 self.widget_list[1].set_active(self.focus_position == 1)
264 key = None
265
266 # This is essentially a copypasta from urwid.Pile's keypress handler.
267 # So much for "closed for modification, but open for extension".
268 item_rows = None
269 if len(size) == 2:
270 item_rows = self.get_item_rows(size, focus=True)
271 tsize = self.get_item_size(size, self.focus_position, True, item_rows)
272 return self.focus.keypress(tsize, key)

Callers 2

keypressMethod · 0.45
keypressMethod · 0.45

Calls 1

set_activeMethod · 0.45

Tested by

no test coverage detected