diff options
author | Ollie Ford <dev@ojford.com> | 2017-07-02 04:38:14 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-07-01 20:38:14 -0700 |
commit | 32dfddb91d30bd6d0e85512433da98c1bb036093 (patch) | |
tree | 521a4e37e6b7d8245496cad0db1e6d043e6007f6 | |
parent | 3cdba291242cc1c1684bff7f8242262b1cdeb582 (diff) | |
download | alacritty-32dfddb91d30bd6d0e85512433da98c1bb036093.tar.gz alacritty-32dfddb91d30bd6d0e85512433da98c1bb036093.zip |
Document binding keys to a `command` (#647)
* Refactor `key_bindings` documentation
* Document binding keys to a `command`
The ability for `key_bindings` to trigger a `command` was added in #566.
This commit documents their use, and gives a simple example.
Resolves #646.
-rw-r--r-- | alacritty.yml | 12 | ||||
-rw-r--r-- | alacritty_macos.yml | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/alacritty.yml b/alacritty.yml index 42106765..686cb387 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -182,10 +182,14 @@ visual_bell: # capitalization must match exactly, and piped items must not have whitespace # around them. # -# Either an `action` or `chars` field must be present. `chars` writes the -# specified string every time that binding is activated. These should generally -# be escape sequences, but they can be configured to send arbitrary strings of -# bytes. Possible values of `action` include `Paste` and `PasteSelection`. +# Either an `action`, `chars`, or `command` field must be present. +# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`. +# `chars` writes the specified string every time that binding is activated. +# These should generally be escape sequences, but they can be configured to +# send arbitrary strings of bytes. +# `command` must be a map containing a `program` string, and `args` array of +# strings. For example: +# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } } # # Want to add a binding (e.g. "PageUp") but are unsure what the X sequence # (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux, diff --git a/alacritty_macos.yml b/alacritty_macos.yml index 415e3892..007d3b42 100644 --- a/alacritty_macos.yml +++ b/alacritty_macos.yml @@ -182,10 +182,14 @@ visual_bell: # capitalization must match exactly, and piped items must not have whitespace # around them. # -# Either an `action` or `chars` field must be present. `chars` writes the -# specified string every time that binding is activated. These should generally -# be escape sequences, but they can be configured to send arbitrary strings of -# bytes. Possible values of `action` include `Paste` and `PasteSelection`. +# Either an `action`, `chars`, or `command` field must be present. +# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`. +# `chars` writes the specified string every time that binding is activated. +# These should generally be escape sequences, but they can be configured to +# send arbitrary strings of bytes. +# `command` must be a map containing a `program` string, and `args` array of +# strings. For example: +# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } } key_bindings: - { key: V, mods: Command, action: Paste } - { key: C, mods: Command, action: Copy } |