1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-27 15:37:29 +03:00
wezterm/docs/config/lua/keyassignment/ActivatePaneByIndex.md

22 lines
567 B
Markdown
Raw Normal View History

# ActivatePaneByIndex
*Since: 20220319-142410-0fcdea07*
`ActivatePaneByIndex` activates the pane with the specified index within
the current tab. Invalid indices are ignored.
This example causes ALT-a, ALT-b, ALT-c to switch to the 0th, 1st and 2nd
panes, respectively:
```lua
local wezterm = require 'wezterm';
return {
keys = {
{key="a", mods="ALT", action=wezterm.action{ActivatePaneByIndex=0}},
{key="b", mods="ALT", action=wezterm.action{ActivatePaneByIndex=1}},
{key="c", mods="ALT", action=wezterm.action{ActivatePaneByIndex=2}},
}
}
```