alesya-h / linux_detect_tablet_mode

Detect if your laptop is in normal or tablet mode. Useful for Yoga laptops to disable keyboard/trackpoint/touchpad in a tablet mode
MIT License
138 stars 29 forks source link

Possible to change the trigger? #15

Closed l0drex closed 3 years ago

l0drex commented 4 years ago

My pc activates the tablet mode when the screen is turned full 360° around. Is it possible to change that so that the tablet mode is activated already when the screen is turned only 180°?

I'm using a Lenovo Yoga 530, which uses the device pci-0000:00:1f.0-platform-VPC2004:00-event.

alesya-h commented 3 years ago

Normal/tablet events come from libinput, where they come from the kernel, where they most likely come from hardware directly. For some models those events might be synthetic and be calculated by the driver from the data from a pair of accelerometers, for others there might be a hardware toggle. So no, in the main version of the project there is no control over it unless you want to do kernel hacking. There's also an old version in the old directory that calculates tablet mode indirectly if two accelerometers are available in userspace. I believe it had a threshold at 180 degrees, and it's trivial to change.

l0drex commented 3 years ago

Oh, ok. Then I guess I can't change it. Thanks :)