1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 13:16:39 +03:00

docs: slightly clarify key assignment docs

refs: #1190
This commit is contained in:
Wez Furlong 2021-10-03 09:10:04 -07:00
parent 6eb6fd6088
commit fc3f6cb9ce
5 changed files with 37 additions and 0 deletions

View File

@ -213,6 +213,10 @@ return {
}
```
The `action` value can be one of the [available key
assignments](lua/keyassignment/index.md). Every action has an example that shows
how to use it.
The `key` value can be one of the following keycode identifiers. Note that not
all of these are meaningful on all platforms:

View File

@ -4,5 +4,13 @@
Activates copy mode!
```lua
return {
keys = {
{key="X", mods="CTRL", action="ActivateCopyMode"},
}
}
```
[Learn more about copy mode](../../../copymode.html)

View File

@ -3,4 +3,17 @@
If the current mouse cursor position is over a cell that contains
a hyperlink, this action causes that link to be opened.
```lua
local wezterm = require 'wezterm';
return {
mouse_bindings = {
-- Ctrl-click will open the link under the mouse cursor
{
event={Up={streak=1, button="Left"}},
mods="CTRL",
action="OpenLinkAtMouseCursor",
},
},
}
```

View File

@ -13,3 +13,12 @@ The REPL has the following globals available:
The lua context in the REPL is not connected to any global state; you cannot use it
to dynamically assign event handlers for example. It is primarily useful for
prototyping lua snippets before you integrate them fully into your config.
```lua
return {
keys = {
-- CTRL-SHIFT-l activates the debug overlay
{key="L", mods="CTRL", action="ShowDebugOverlay"},
}
}
```

View File

@ -13,6 +13,9 @@
Looking for a [configuration reference?](config/files.md)
**These docs are searchable: press `S` or click on the magnifying glass icon
to activate the search function!**
<img width="100%" height="100%" src="screenshots/two.png" alt="Screenshot">
*Screenshot of wezterm on macOS, running vim*