Skip to content

Conversation

@ProfLander
Copy link

Implements input.button-scroll-factor using the existing ScrollFactor type, and applies it to events of type AxisSource::Continuous.

I've followed the hyprland pattern of having the input -level setting govern button-style scroll speed so as to avoid per-device clutter or collision with existing scroll-factor settings, and added a clarifying button- prefix to ensure users don't look at it and assume a global modifier, rather than an event-specific one.

Closes #2841, #2393

@YaLTeR
Copy link
Owner

YaLTeR commented Nov 19, 2025

Maybe it should just follow the normal scroll-factor somehow? In sway there doesn't seem to be a separate button scroll factor. Besides, with specific input device config, there will be just a device-specific scroll-factor too.

@ProfLander
Copy link
Author

There is no 'normal' scroll factor as-is; input.mouse.scroll-factor modifies AxisSource::Wheel events, and input.trackpad.scroll-factor modifies AxisSource::Finger events. Trackball and trackpoint have no hardware-specific equivalent, so are assumed to emulate via on-button-down, which emits AxisSource::Continuous.

Since those are semantically distinct, and all types of pointer can use button scrolling, they need their own sensitivity modifiers to avoid coupling. For example: A mouse's line-based wheel sensitivity shouldn't be tied to its sensor-based button-scroll sensitivity, in the case where both are active.

Hyprland's solution is to treat button scrolling as a singleton like I have here, but that does miss the idea that button scrolling is DPI-relative; more exotic setups with multiple pointing devices could benefit from button-scroll-sensitivity being a device -level setting instead of a global one.

@YaLTeR
Copy link
Owner

YaLTeR commented Nov 19, 2025

Hm well I don't see another way before some bigger refactoring so let's go with this. Do you mind adding it to the wiki page, not forgetting the Since: next release annotation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scroll-factor does not apply to trackball devices

2 participants