本文主要是介绍linux 触屏, 旋转后配置pen,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
https://www.reddit.com/r/SurfaceLinux/comments/kgpb8g/howto_rotate_a_surface_device_display_and_have/
主要获取笔的string,和旋转向量
#!/bin/sh# This script is for X sessions. I don't know how this would
# work in wayland.orientation="$(xrandr -q | grep -v dis | grep connected | awk '{print $5}' | sed 's:(::')"
displayName="$(xrandr -q | grep -v dis | grep connected | awk '{print $1}')"
matrix="1 0 0 0 1 0 0 0 1"if [ "${orientation}" != "normal" ] ; thenxrandr --output "${displayName}" --rotate normalxinput set-prop "IPTS Touch" --type=float \"Coordinate Transformation Matrix" ${matrix}xinput set-prop "IPTS Stylus Pen (0)" --type=float \"Coordinate Transformation Matrix" ${matrix}xinput set-prop "IPTS Stylus Eraser (0)" --type=float \"Coordinate Transformation Matrix" ${matrix}xinput set-prop "Microsoft Surface Keyboard Mouse" --type=float \"Coordinate Transformation Matrix" ${matrix}xinput set-prop "Microsoft Surface Keyboard Touchpad" --type=float \"Coordinate Transformation Matrix" ${matrix}
fi
相应配置left, right, reverse
这篇关于linux 触屏, 旋转后配置pen的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!