2020-10-10 18:40:14 +03:00
|
|
|
# ScrollByPage
|
|
|
|
|
|
|
|
Adjusts the scroll position by the number of pages specified by the argument.
|
|
|
|
Negative values scroll upwards, while positive values scroll downwards.
|
|
|
|
|
|
|
|
```lua
|
2022-06-25 16:58:10 +03:00
|
|
|
local wezterm = require 'wezterm'
|
2022-07-15 16:38:57 +03:00
|
|
|
local act = wezterm.action
|
2020-10-10 18:40:14 +03:00
|
|
|
|
|
|
|
return {
|
|
|
|
keys = {
|
2022-07-19 17:54:31 +03:00
|
|
|
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) },
|
|
|
|
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) },
|
|
|
|
},
|
2020-10-10 18:40:14 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-20 02:37:27 +03:00
|
|
|
*Since: 20220319-142410-0fcdea07*
|
2020-10-10 18:40:14 +03:00
|
|
|
|
2022-01-12 08:49:36 +03:00
|
|
|
You may now use floating point values to scroll by partial pages. This example shows
|
|
|
|
how to make the `PageUp`/`PageDown` scroll by half a page at a time:
|
|
|
|
|
|
|
|
```lua
|
2022-07-19 17:54:31 +03:00
|
|
|
local wezterm = require 'wezterm'
|
2022-01-12 08:49:36 +03:00
|
|
|
|
|
|
|
return {
|
|
|
|
keys = {
|
2022-07-19 17:54:31 +03:00
|
|
|
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-0.5) },
|
|
|
|
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(0.5) },
|
|
|
|
},
|
2022-01-12 08:49:36 +03:00
|
|
|
}
|
|
|
|
```
|