mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 21:32:13 +03:00
docs: add example for SendString + escape sequences
closes: https://github.com/wez/wezterm/issues/253
This commit is contained in:
parent
11b298d3ed
commit
609c707e91
@ -491,6 +491,23 @@ return {
|
||||
}
|
||||
```
|
||||
|
||||
You can also emit escape sequences using `SendString`. This example shows
|
||||
how to bind Alt-LeftArrow/RightArrow to the Alt-b/f, an emacs style
|
||||
keybinding for moving backwards/forwards through a word in a line editor:
|
||||
|
||||
```lua
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
keys = {
|
||||
-- Make Option-Left equivalent to Alt-b which many line editors interpret as backward-word
|
||||
{key="LeftArrow", mods="OPT", action=wezterm.action{SendString="\x1bb"}},
|
||||
-- Make Option-Right equivalent to Alt-f; forward-word
|
||||
{key="RightArrow", mods="OPT", action=wezterm.action{SendString="\x1bf"}},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## DisableDefaultAssignment
|
||||
|
||||
Has no special meaning of its own; this action will undo the registration
|
||||
|
Loading…
Reference in New Issue
Block a user