2022-01-07 17:30:17 +03:00
|
|
|
# ActivatePaneByIndex
|
|
|
|
|
2022-03-20 02:37:27 +03:00
|
|
|
*Since: 20220319-142410-0fcdea07*
|
2022-01-07 17:30:17 +03:00
|
|
|
|
|
|
|
`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
|
2022-06-25 16:58:10 +03:00
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
local act = wezterm.action
|
2022-01-07 17:30:17 +03:00
|
|
|
|
|
|
|
return {
|
2022-02-25 09:04:46 +03:00
|
|
|
keys = {
|
2022-07-19 17:54:31 +03:00
|
|
|
{ key = 'a', mods = 'ALT', action = act.ActivatePaneByIndex(0) },
|
|
|
|
{ key = 'b', mods = 'ALT', action = act.ActivatePaneByIndex(1) },
|
|
|
|
{ key = 'c', mods = 'ALT', action = act.ActivatePaneByIndex(2) },
|
|
|
|
},
|
2022-01-07 17:30:17 +03:00
|
|
|
}
|
|
|
|
```
|