Skip to content

Scroll use mouse wheel is too quickly for me, is there possible to change this behavior? #4947

Answered by bgrasmo
zw963 asked this question in Q&A
Discussion options

You must be logged in to vote

I just encountered this myself, but found out how to modify it:

local act = wezterm.action

-- Change mouse scroll amount
config.mouse_bindings = {
  {
    event = { Down = { streak = 1, button = { WheelUp = 1 } } },
    mods = 'NONE',
    action = act.ScrollByLine(-3),
  },
  {
    event = { Down = { streak = 1, button = { WheelDown = 1 } } },
    mods = 'NONE',
    action = act.ScrollByLine(3),
  },
}

This scrolls by 3 lines up and down, which it turns out was what my previous terminal was doing.

I found the ScrollByLine action in the KeyAssignment part of the documentation. There are others there, like ScrollByPage, ScrollToTop and ScrollToBottom which are interesting as well.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@zw963
Comment options

@c5n8
Comment options

@zw963
Comment options

Answer selected by zw963
Comment options

You must be logged in to vote
3 replies
@Erik262
Comment options

@joshuataylor
Comment options

@Erik262
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants