您的位置:首页 > 其它

ubuntu 触摸屏横屏变竖屏解决 触摸功能仍然是横屏的问题

2018-02-06 13:43 1586 查看
在经过横屏转竖屏时,发现触摸屏仍然是横屏时候的触摸点。横屏时触摸屏正常使用,竖屏时不正常。

解决:需要将 触摸屏进行旋转  通过 input。

通过 xrandr -o right 旋转后触摸屏不正常。

 旋转触摸的坐标轴, 

xinput --list 查看触摸屏id,或者名字 。名字记得复制全。

 1) 交换x、y轴

  xinput --set-prop '7' 'Evdev Axes Swap' 1           // 7为我当时的端口id,会变化。  用名字代替也可以。

 2)  反转y轴

  xinput --set-prop '7' 'Evdev Axis Inversion' 0 1

目录:    /usr/share/X11/xorg.conf.d/ 10-evdev.conf    界面显示的配置文件,可以通过这个文件调整触摸点。看清楚再改有风险,当时我改了之后 界面不显示,只能通过窗口再改回来。界面系统文件小心。

校准命令 : xinput_calibrator      然后开始点击确定触摸屏,完成后输出如下:

Setting calibration data: 0, 32767, 0, 32767

Calibrating EVDEV driver for "Touch Touch Device F47WH00U-CT-A1-2P" id=10
current calibration values (from XInput): min_x=0, max_x=32767 and min_y=0, max_y=32767

Doing dynamic recalibration:
Inverting X and/or Y axis...
Setting calibration data: -23, 32805, 32710, -11
--> Making the calibration permanent <--

  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)

Section "InputClass"
Identifier
"calibration"
MatchProduct
"Touch Touch Device F47WH00U-CT-A1-2P"
Option
"Calibration" "-23 32805 32710 -11"
Option
"SwapAxes" "1"

EndSection

如需更改在 Driver "evdev" 下面添加 矫正输出   Option
"Calibration"
"-23 32805 32710 -11"


        Section "InputClass"

        Identifier "evdev touchscreen catchall"

        MatchIsTouchscreen "on"

        MatchDevicePath "/dev/input/event*"

         Driver "evdev"

        EndSection
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: