# * need ATTRS{name}=="sec_touchscreen" else device not detected as touchscreen
# * give size hint (in mm) otherwise too small size is assumed
# * to avoid palm detection, need LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD=256
#   and libinput>1.10
# * set calibration matrix for 270 degree clockwise rotation, see [1]
# * remove TOUCHPAD, add TOUCHSCREEN to ensure that device is seen as
#   touchscreen only, see [2]
#
# [1] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html
# [2] https://wayland.freedesktop.org/libinput/doc/latest/udev_config.html#udev_device_type
#
ACTION=="add|change", SUBSYSTEM=="input", ATTRS{name}=="sec_touchscreen", \
ENV{LIBINPUT_ATTR_SIZE_HINT}="190x140", \
ENV{LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD}="256", \
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1", \
ENV{ID_INPUT}="1", \
ENV{ID_INPUT_TOUCHPAD}="", \
ENV{ID_INPUT_TOUCHSCREEN}="1"
