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

Method key_bind

mitmproxy/tools/console/consoleaddons.py:690–703  ·  view source on GitHub ↗

Bind a shortcut key.

(
        self,
        contexts: Sequence[str],
        key: str,
        cmd: mitmproxy.types.Cmd,
        *args: mitmproxy.types.CmdArgs,
    )

Source from the content-addressed store, hash-verified

688
689 @command.command("console.key.bind")
690 def key_bind(
691 self,
692 contexts: Sequence[str],
693 key: str,
694 cmd: mitmproxy.types.Cmd,
695 *args: mitmproxy.types.CmdArgs,
696 ) -> None:
697 """
698 Bind a shortcut key.
699 """
700 try:
701 self.master.keymap.add(key, cmd + " " + " ".join(args), contexts, "")
702 except ValueError as v:
703 raise exceptions.CommandError(v)
704
705 @command.command("console.key.unbind")
706 def key_unbind(self, contexts: Sequence[str], key: str) -> None:

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected