Files
LLeMbas-TTY/docs/config/lua/wezterm/action.md
T
Wez Furlong 809bb53387 docs: split out the KeyAssignment enum variants
This makes the individual functions a bit easier to discover,
and a lot easier to link to.
2020-10-10 08:45:13 -07:00

27 lines
970 B
Markdown

# `wezterm.action`
Helper for defining key assignment actions in your configuration file.
This is really just sugar for the underlying Lua -> Rust deserialation
mapping that makes it a bit easier to identify where syntax errors may
exist in your configuration file.
Usage looks like this:
```lua
local wezterm = require 'wezterm';
return {
keys = {
{key="{", mods="CTRL", action=wezterm.action{ActivateTabRelative=-1}},
{key="}", mods="CTRL", action=wezterm.action{ActivateTabRelative=1}},
}
}
```
The parameter is a lua representation of the underlying KeyAssignment enum from
the configuration code. These docs aim to spell out sufficient examples that
you shouldn't need to learn to read Rust code, but there are occasions where
newly developed features are not yet documented and an enterprising user may
wish to go spelunking to figure them out!
[You can find the reference for available KeyAssignment values here](../keyassignment/index.md).