diff --git a/docs/config/keys.md b/docs/config/keys.md index efd7f784d..ab510703f 100644 --- a/docs/config/keys.md +++ b/docs/config/keys.md @@ -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: diff --git a/docs/config/lua/keyassignment/ActivateCopyMode.md b/docs/config/lua/keyassignment/ActivateCopyMode.md index 583fb7b1f..898121060 100644 --- a/docs/config/lua/keyassignment/ActivateCopyMode.md +++ b/docs/config/lua/keyassignment/ActivateCopyMode.md @@ -4,5 +4,13 @@ Activates copy mode! +```lua +return { + keys = { + {key="X", mods="CTRL", action="ActivateCopyMode"}, + } +} +``` + [Learn more about copy mode](../../../copymode.html) diff --git a/docs/config/lua/keyassignment/OpenLinkAtMouseCursor.md b/docs/config/lua/keyassignment/OpenLinkAtMouseCursor.md index cc1055cd9..d037a8446 100644 --- a/docs/config/lua/keyassignment/OpenLinkAtMouseCursor.md +++ b/docs/config/lua/keyassignment/OpenLinkAtMouseCursor.md @@ -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", + }, + }, +} +``` diff --git a/docs/config/lua/keyassignment/ShowDebugOverlay.md b/docs/config/lua/keyassignment/ShowDebugOverlay.md index 66922e92a..8733cdcae 100644 --- a/docs/config/lua/keyassignment/ShowDebugOverlay.md +++ b/docs/config/lua/keyassignment/ShowDebugOverlay.md @@ -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"}, + } +} +``` diff --git a/docs/index.md b/docs/index.md index 48e912ea3..eb6ebf35a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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!** + Screenshot *Screenshot of wezterm on macOS, running vim*