mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
docs: console key binding docs and example
This commit is contained in:
parent
fe4c371001
commit
2db223decb
@ -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" >}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
examples/keys.yaml
Normal file
11
examples/keys.yaml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user