Files
LLeMbas-TTY/docs/config/lua/keyassignment/ScrollByCurrentEventWheelDelta.md
T
Wez Furlong bd846975fa allow wheel events with no mods. allow mouse events in mouse reporting mode
Adjusts how mouse events are matched so that we can now indicate whether
mouse reporting and alt-screen should be considered as part of the event
trigger criteria.

refs: #2173
refs: #581
2022-07-31 09:15:02 -07:00

810 B

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 to true.

local wezterm = require 'wezterm'
local act = wezterm.action

return {
  mouse_bindings = {
    {
      event = 'WheelUp',
      mods = 'NONE',
      action = act.ScrollByCurrentEventWheelDelta,
    },
    {
      event = 'WheelDown',
      mods = 'NONE',
      action = act.ScrollByCurrentEventWheelDelta,
    },
  },
}