Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input/mouse: add accel_profile custom #8592

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EBADBEEF
Copy link
Contributor

@EBADBEEF EBADBEEF commented Mar 4, 2025

Support libinput LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM to define a custom mouse pointer acceleration curve. Implements #8488.

Custom acceleration curve is documented in libinput https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html#the-custom-acceleration-profile.

Some thoughts:

Custom acceleration is also supported for scrolling, but this commit only implements pointer motion (LIBINPUT_ACCEL_TYPE_MOTION).

We can't detect if values changed because libinput does not provide a way to read back values set by libinput_config_accel_set_points/libinput_device_config_accel_apply. Sway seems to want to know if it changed to trigger a notification (ipc_event_input).

I stuffed the "step" and "points" values into one config option. Maybe it's better to have two like libinput.conf AccelStepMotion/AccelPointsMotion.

EBADBEEF added 2 commits March 4, 2025 21:58
Support libinput LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM to define a custom
mouse pointer acceleration curve. Implements swaywm#8488.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant