首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在16:10屏幕上调整4:3宽宽比的触摸屏坐标

在16:10屏幕上调整4:3宽宽比的触摸屏坐标
EN

Unix & Linux用户
提问于 2019-07-12 19:46:36
回答 1查看 427关注 0票数 1

你好,我最近有个奇怪的设备。这是一款本机分辨率为800x1280的平板电脑-是的,它是向后的。显示器处于纵向模式,我必须做一些xorg配置编辑,以旋转屏幕和旋转触摸屏。如果我使用本机分辨率,这是很好的,但是我试图让它使用一个768x1024分辨率。我已经成功地在4:3模式下获得了768x1024分辨率(旁边有黑条,这正是我想要的),使用以下命令在平板上显示:

代码语言:javascript
运行
复制
user1:~ # xrandr --newmode "768x1024_60.00"   65.25  768 816 896 1024  1024 1027 1037 1063 -hsync +vsync
user1:~ # xrandr --addmode DSI-1 768x1024_60.00
user1:~ # xrandr -s 768x1024_60.00

我遇到的问题是如何让实际的触摸屏数字化器与它保持一致,就好像它还停留在16:10。下面是我的xorg配置文件:

代码语言:javascript
运行
复制
user1:~ # cat /etc/X11/xorg.conf.d/99-touchscreen.conf
Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "SwapAxes" "true"
        Option "InvertY" "true"
EndSection

user1:~ # cat /etc/X11/xorg.conf.d/50-monitor.conf
Section "Monitor"
    Identifier "DSI-1"
    Option "Rotate" "right"
EndSection

以下是触摸屏的属性:

代码语言:javascript
运行
复制
Device 'Goodix Capacitive TouchScreen':
    Device Enabled (152):   1
    Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (284):     0
    Device Accel Constant Deceleration (285):       1.000000
    Device Accel Adaptive Deceleration (286):       1.000000
    Device Accel Velocity Scaling (287):    10.000000
    Device Product ID (276):        1046, 9111
    Device Node (275):      "/dev/input/event2"
    Evdev Axis Inversion (288):     0, 1
    Evdev Axis Calibration (289):   <no items>
    Evdev Axes Swap (290):  1
    Axis Labels (291):      "Abs MT Position X" (282), "Abs MT Position Y" (283), "Abs MT Touch Major" (280), "Abs MT Width Major" (281), "None" (0), "None" (0)
    Button Labels (292):    "Button Unknown" (277), "Button Unknown" (277), "Button Unknown" (277), "Button Wheel Up" (158), "Button Wheel Down" (159)
    Evdev Scrolling Distance (293): 0, 0, 0
    Evdev Middle Button Emulation (294):    0
    Evdev Middle Button Timeout (295):      50
    Evdev Third Button Emulation (296):     0
    Evdev Third Button Emulation Timeout (297):     1000
    Evdev Third Button Emulation Button (298):      3
    Evdev Third Button Emulation Threshold (299):   20
    Evdev Wheel Emulation (300):    0
    Evdev Wheel Emulation Axes (301):       0, 0, 4, 5
    Evdev Wheel Emulation Inertia (302):    10
    Evdev Wheel Emulation Timeout (303):    200
    Evdev Wheel Emulation Button (304):     4
    Evdev Drag Lock Buttons (305):  0
    Evdev Kiosk Touch Mode (306):   0
    Evdev Kiosk Touch Button (307): 1
    Evdev Kiosk Touch Button Delay (308):   0

所以这是我需要编辑触摸矩阵的情况吗?对此有什么建议吗?还是有更简单的方法?谢谢你的帮助。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-07-12 21:22:55

我能够用xinput_calibrator解决这个问题,这给了我正确的xorg校准数据。

基本上,打开一个终端窗口并启动xinput_calibrator并触摸它要求您触摸的点。完成后,终端窗口将显示与xorg一起使用的信息:

代码语言:javascript
运行
复制
user1:~> xinput_calibrator
Calibrating EVDEV driver for "Goodix Capacitive TouchScreen" id=11
        current calibration values (from XInput): min_x=66, max_x=725 and min_y=-5, max_y=1284

Doing dynamic recalibration:
        Setting new calibration data: 61, 730, -3, 1272


--> Making the calibration permanent <--
  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'
Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "Goodix Capacitive TouchScreen"
        Option  "Calibration"   "61 730 -3 1272"
EndSection
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/529896

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档