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

Configuring LibInput devices #47

Open
billy4479 opened this issue Jan 9, 2024 · 9 comments
Open

Configuring LibInput devices #47

billy4479 opened this issue Jan 9, 2024 · 9 comments

Comments

@billy4479
Copy link

I happen to use natural scrolling and a few other options on my laptop touchpad.
These option are set in ~/.config/kcminputrc as

[Libinput][10182][480][GXTP7863:00 27C6:01E0 Touchpad]
DisableWhileTyping=false
NaturalScroll=true
TapToClick=true

I'd like to use these same settings for any laptop I (will) use.
As you can see the group name is kinda device-specific: for sure the last part ([GXTP7863:00 27C6:01E0 Touchpad]) is the name of the input device as it shows in libinput list-devices; I still haven't figured out what the other two numbers are ([10182] and [480]).

For now I can just hardcode them in my config but I don't think that's the best solution..

If someone manages to figure out what the other two numbers are we could query them at activation-time and have an option to enable or disable such features for any touchpad.

@toast003
Copy link
Collaborator

Tried finding out what writes the numbers are by reading the source code for the mouse kcm but I haven't gotten anything yet

@toast003
Copy link
Collaborator

toast003 commented Jan 11, 2024

This repo just puts setting under [Mouse] 🤔
I'll try it out
EDIT: Don't think it works anymore (the config file I linked is 8 years old after all), but I'm doing other things so I can't log out or restart plasma, so maybe that's why it doesn't work

@billy4479
Copy link
Author

Tried finding out what writes the numbers are by reading the source code for the mouse kcm but I haven't gotten anything yet

Thanks for the link, I'll try to look into it too.

Also, I forgot to add in the original post that I'm using the Wayland session. Maybe the X11 session uses some other config (?), I'll try to login into a X session when I have time and I'll let you know if I find any difference.

@toast003
Copy link
Collaborator

toast003 commented Jan 11, 2024 via email

@ribru17
Copy link

ribru17 commented Mar 31, 2024

If someone manages to figure out what the other two numbers are we could query them at activation-time and have an option to enable or disable such features for any touchpad.

The first two numbers are the decimal representations of the middle (hexadecimal) numbers: e.g., for
[Libinput][10182][480][GXTP7863:00 27C6:01E0 Touchpad]:
10182 = 0x27C6
480=0x1E0

@ChocolateLoverRaj
Copy link

I would like an option to enable reverse scrolling on all touchpads regardless of ID

@toast003
Copy link
Collaborator

toast003 commented Apr 2, 2024

For usb devices the two numbers are the usb id in decimal, and the name is just the name of the device, for i2c devices (touchpads) the two numbers are some sort of id, then the name is the name of the device followed by it's name (how it shows up in /sys/bus/i2c/devices) followed by the id again in hex and then Touchpad

@ribru17
Copy link

ribru17 commented Apr 4, 2024

@toast003 So if we specifically want an option for touchpad behavior, we can just cat /proc/bus/input/devices | grep -i touchpad and deterministically extract the numbers from just before "Touchpad", using them to index the setting field?

Edit: we can grep the ID with cat /proc/bus/input/devices | grep -i touchpad | sed 's/N: Name=".* \(.*\) Touchpad"/\1/'

@toast003
Copy link
Collaborator

We could do that, although I'm not sure if that's something that should be done in write_config.py or a new script

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

No branches or pull requests

4 participants