You are not logged in.

#1 2022-01-04 12:09:52

cyberpunkrocker
Member
From: Birckala, Finland
Registered: 2019-09-16
Posts: 36
Website

Laptop touchpad vs. bluetooth mouse

I have the following udev rule to turn laptop touchpad off/on when an external mouse is in use:

SUBSYSTEM=="input", ACTION=="add", ATTR{name}=="Logitech Pebble Mouse", RUN+="/bin/su <user> -c 'DISPLAY=:0 xinput --disable 11'"
SUBSYSTEM=="input", ACTION=="remove", ATTR{name}=="Logitech Pebble Mouse", RUN+="/bin/su <user> -c 'DISPLAY=:0 xinput --enable 11'"

That kind of rule works fine with USB mice, but does not behave correctly with a bluetooth mouse (Logitech Pebble) I'm currently using. The touchpad gets disabled when I power on the BT mouse, like it should. But when I power off the mouse, BlueMan correctly informs that the mouse is disabled, but the touchpad fails to become re-enabled. Obviously, the bluetooth subsystem is not relaying to the kernel the information that the BT mouse is not there any more.

How should I modify the udev rule to make it work with a BT mouse?

Of course, I could just type

xinput --enable 11

into terminal to enable the touchpad, but that feel kind of... kludgey. I'd rather have udev to properly handle it.

Offline

#2 2022-01-04 14:27:06

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Laptop touchpad vs. bluetooth mouse

You can use this to check what the kernel & udev receive from the mouse when it's turned off:

udevadm monitor

This post seems to suggest the "hid" subsystem might be more useful for Bluetooth.

Disclaimer: I don't use Bluetooth myself so I can't test.


Jin, Jîyan, Azadî

Offline

#3 2022-01-04 14:52:32

cyberpunkrocker
Member
From: Birckala, Finland
Registered: 2019-09-16
Posts: 36
Website

Re: Laptop touchpad vs. bluetooth mouse

Thanks for the link, that might actually work.

Offline

#4 2022-01-04 15:36:19

cyberpunkrocker
Member
From: Birckala, Finland
Registered: 2019-09-16
Posts: 36
Website

Re: Laptop touchpad vs. bluetooth mouse

No, using the 'hid' subsystem as per the thread didn't work at all sad . Well, it was almost 10 years old thread...

Offline

#5 2022-01-04 19:19:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Laptop touchpad vs. bluetooth mouse

So what did udevadm show?


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB