Hello
I recently published Fingerpaint on Snapcraft, and I would like that the app to work out of the box (without manual connections).
The app allows you to draw using your touchpad, using it as a canvas (that means getting raw/absolute touch data from the sensor).
In order to do that I need:
- The
raw-input
plug (for access to/dev/input/eventX
) - The
hardware-observe
plug (for navigating/sys
to know which device is the touchpad)
In addition, I add a udev rule (ENV{ID_INPUT_TOUCHPAD}=="1", MODE="0664"
) that allows non-root users to access this device (I consider this ok privacy-wise since it’s just a touchpad, not a keyboard, and since getting this data is rather trivial anyway when not running in a confined snap).
Adding the udev rule is handled by prompting the user to run a setup script as root (outside the sandbox) if the device is inaccessible.
Thanks