diff options
author | Aldo Cortesi <aldo@corte.si> | 2018-05-15 10:34:55 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2018-05-15 10:34:55 +1200 |
commit | 2db223decbf2aecb80aa3adc96643e84100bbb22 (patch) | |
tree | 219b177da9b95c1e99a8ce658fbdd9c34bdeda51 | |
parent | fe4c371001c0c9f1895e3ed6dea7506617b5e3cb (diff) | |
download | mitmproxy-2db223decbf2aecb80aa3adc96643e84100bbb22.tar.gz mitmproxy-2db223decbf2aecb80aa3adc96643e84100bbb22.tar.bz2 mitmproxy-2db223decbf2aecb80aa3adc96643e84100bbb22.zip |
docs: console key binding docs and example
-rw-r--r-- | docs/src/content/tools-mitmproxy.md | 18 | ||||
-rw-r--r-- | examples/keys.yaml | 11 |
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/src/content/tools-mitmproxy.md b/docs/src/content/tools-mitmproxy.md index 6505fac4..d3f05aef 100644 --- a/docs/src/content/tools-mitmproxy.md +++ b/docs/src/content/tools-mitmproxy.md @@ -16,3 +16,21 @@ kept in memory, which means that it's intended for taking and manipulating small-ish samples. Use the `?` shortcut key to view, context-sensitive documentation from any **mitmproxy** screen. +### Key binding configuration + +Mitmproxy's key bindings can be customized through in the +`~/.mitmproxy/keys.yaml` file. This file consists of a sequence of maps, with +the following keys: + +* `key` (**mandatory**): The key to bind. +* `cmd` (**mandatory**): The command to execute when the key is pressed. +* `context`: A list of contexts in which the key should be bound. By default this is **global** (i.e. the key is bound everywhere). Valid contexts are `chooser`, `commands`, `dataviewer`, `eventlog`, `flowlist`, `flowview`, `global`, `grideditor`, `help`, `keybindings`, `options`. +* `help`: A help string for the binding which will be shown in the key binding browser. + +#### Example + +{{< example src="examples/keys.yaml" lang="yaml" >}} + + + + diff --git a/examples/keys.yaml b/examples/keys.yaml new file mode 100644 index 00000000..a2b3d66a --- /dev/null +++ b/examples/keys.yaml @@ -0,0 +1,11 @@ +- + # Simple global binding + key: ctrl a + cmd: replay.client @marked +- + # Bind key only in the lfowlist + # Note that 1 is quoted, or YAML interprets it as a digit + key: "1" + ctx: ["flowlist"] + cmd: console.nav.down + help: Go to next flow
\ No newline at end of file |