Discussion: #8649
You can see in the source that the mouse-scroll-multiplier config is unused in the precision scroll path:
|
// If we have precision scroll, yoff is the number of pixels to scroll. In non-precision |
|
// scroll, yoff is the number of wheel ticks. Some mice are capable of reporting fractional |
|
// wheel ticks, which don't necessarily get reported as precision scrolls. We normalize all |
|
// scroll events to pixels by multiplying the wheel tick value and the cell size. This means |
|
// that a wheel tick of 1 results in single scroll event. |
|
const yoff_adjusted: f64 = if (scroll_mods.precision) |
|
yoff |
|
else yoff_adjusted: { |
|
// Round out the yoff to an absolute minimum of 1. macos tries to |
|
// simulate precision scrolling with non precision events by |
|
// ramping up the magnitude of the offsets as it detects faster |
|
// scrolling. Single click (very slow) scrolls are reported with a |
|
// magnitude of 0.1 which would normally require a few clicks |
|
// before we register an actual scroll event (depending on cell |
|
// height and the mouse_scroll_multiplier setting). |
|
const yoff_max: f64 = if (yoff > 0) |
|
@max(yoff, 1) |
|
else |
|
@min(yoff, -1); |
|
|
|
break :yoff_adjusted yoff_max * cell_size * self.config.mouse_scroll_multiplier; |
|
}; |
We don't want to blindly apply it to the precision case because the default value of 3 will result in a speed that is way too fast. Dividing by 3 to normalize the default is equally ugly and also just arbitrary...
Instead, we should allow a separate precision vs non-precision scroll multiplier. I propose the following:
# Apply everywhere
mouse-scroll-multiplier = 3
# Apply separately
mouse-scroll-multiplier = precision:2,discrete:3
# Apply one, default other
mouse-scroll-multiplier = precision:2
"Precision" and "discrete" are not strictly opposite ("continuous" would be better for example) but precision scrolling is a common term used to describe mouse inputs that can report continuous values, so I think it hits better.
Discussion: #8649
You can see in the source that the
mouse-scroll-multiplierconfig is unused in the precision scroll path:ghostty/src/Surface.zig
Lines 2805 to 2826 in a32d498
We don't want to blindly apply it to the precision case because the default value of
3will result in a speed that is way too fast. Dividing by 3 to normalize the default is equally ugly and also just arbitrary...Instead, we should allow a separate precision vs non-precision scroll multiplier. I propose the following:
"Precision" and "discrete" are not strictly opposite ("continuous" would be better for example) but precision scrolling is a common term used to describe mouse inputs that can report continuous values, so I think it hits better.