hadess / iio-sensor-proxy

IIO accelerometer sensor to input device proxy
197 stars 64 forks source link

QUESTION: How can I add touchpad disabling to the rotation event? #186

Closed anixon604 closed 6 years ago

anixon604 commented 6 years ago

I have debian 9 / gnome with kernel 4.9 on Lenovo X1 Yoga. iio-sensor works great and I don't see an issue yet. The only thing I need now is to make my touchpad click disable when I'm in tablet mode. Can someone give me some direction or guidance on how to do this?

Thank you.

Hnasar commented 6 years ago

You'd need to watch for the Dbus SensorProxy name and then get the dbus property for the AccelerometerOrientation. See mutter/src/backends/meta-orientation-manager.c or gnome-settings-daemon/plugins/power/gsd-power-manager.c for examples.

After you read the values from the accelerometer then you'll need to flip the gsettings settings responsible for enabling/disabling touchpad (not sure where exactly, probably something like org/gnome/desktop/peripherals/touchpad?)

hadess commented 6 years ago

API documentation for iio-sensor-proxy is here: https://developer.gnome.org/iio-sensor-proxy/2.3/