Files
LLeMbas-TTY/docs/config/lua/keyassignment/ScrollByCurrentEventWheelDelta.md
T
Wez Furlong 4485b2966f mouse bindings: remove WheelUp/Down aliases
They prevented using other types of mouse events!

We don't have a good way to specify that kind of alias, so for now,
take it out and replace the examples in the docs with the more verbose
equivalents.

refs: #2173
refs: #2296
2022-07-31 09:33:42 -07:00

34 lines
894 B
Markdown

# ScrollByCurrentEventWheelDelta
*Since: nightly builds only*
Adjusts the scroll position by the number of lines in the vertical mouse
wheel delta field of the current mouse event, provided that it is a
vertical mouse wheel event.
This example demonstrates a mouse assignment that is actually the default, so
there's not much point adding this to your config unless you also have set
[disable_default_mouse_bindings](../config/disable_default_mouse_bindings.md)
to `true`.
```lua
local wezterm = require 'wezterm'
local act = wezterm.action
return {
mouse_bindings = {
{
event = { Down = { streak = 1, button = { WheelUp = 1 } } },
mods = 'NONE',
action = act.ScrollByCurrentEventWheelDelta,
},
{
event = { Down = { streak = 1, button = { WheelDown = 1 } } },
mods = 'NONE',
action = act.ScrollByCurrentEventWheelDelta,
},
},
}
```