tablet-mode-accel

command module
v0.0.0-...-53de41a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2025 License: Unlicense Imports: 12 Imported by: 0

README

tablet-mode-accel

Many x86 convertibles lack a functional tablet mode switch when running Linux. Some models, however, have accelerometers built into their base and display halves. These accelerometers can be used to infer when the device has entered tablet mode.

This Go program reads those accelerometers and creates a virtual input device that emits SW_TABLET_MODE events. On GNOME, this event enables the screen rotation feature, enables the on-screen keyboard, and disables the keyboard and trackpad (all out-of-the-box, no extensions required). The tablet detection algorithm is based off of Yauhen Kharuzhy's yet-to-be-merged merge request to iio-sensor-proxy. Unlike petitstrawberry's minibook-support daemon, this program does not attempt to suppress keyboard and trackpad events by wrapping them in virtual input devices. On Wayland, libinput automatically suppresses these inputs after receiving a SW_TABLET_MODE event.

This program has been tested specifically on a Piccolo Series81x N150 minibook, but it should work with any convertible equipped with dual accelerometers.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL