在 Samsung ATIV 6 上配置 Atmel MaxTouch 数字转换器

在 Samsung ATIV 6 上配置 Atmel MaxTouch 数字转换器

我正在尝试弄清楚如何为我的 Samsung ATIV 6 配置触摸屏。我正在运行 Kubuntu 13.04。它是一个Amtel maXTouch Digitzer。它可以识别触摸,但只能单击。此外,当我连接外接显示器时,它会认为触摸屏跨越两个屏幕。

我发现很多东西都是针对 Wacom 触摸屏的,但没有针对 Amtel 的。我对 Linux 还很陌生,甚至不知道除了失败的谷歌搜索之外该从哪里开始。我找到了这个结果,但是我没有此文件提到的文件

以下是输出xinput list

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:200a       id=10   [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:1028       id=11   [slave  pointer  (2)]
⎜   ↳ Atmel Atmel maXTouch Digitizer            id=13   [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ WebCam SC-10HDP12631N                     id=12   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

2013年8月11日更新:

我确实想澄清一下,我最大的问题是如何让触摸屏在连接外接显示器的情况下正常工作。如果我触摸触摸屏的右侧,光标会认为我实际上是在触摸外接显示器。我主要想知道如何让系统知道触摸屏在插入时不会拉伸到外接显示器上。

这是以下请求的命令的输出:

lsinput

/dev/input/event0
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x5
   version : 0
   name    : "Lid Switch"
   phys    : "PNP0C0D/button/input0"
   bits ev : EV_SYN EV_SW

/dev/input/event1
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "PNP0C0C/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event2
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event3
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43841
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

/dev/input/event4
   bustype : BUS_USB
   vendor  : 0x46d
   product : 0xc52b
   version : 273
   name    : "Logitech Unifying Device. Wirele"
   phys    : "usb-0000:00:1a.0-1.2:2"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC EV_LED EV_REP

/dev/input/event5
   bustype : BUS_USB
   vendor  : 0x46d
   product : 0xc52b
   version : 273
   name    : "Logitech Unifying Device. Wirele"
   phys    : "usb-0000:00:1a.0-1.2:3"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_MSC

/dev/input/event6
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x6
   version : 0
   name    : "Video Bus"
   phys    : "LNXVIDEO/video/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event7
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x6
   version : 0
   name    : "Video Bus"
   phys    : "LNXVIDEO/video/input0"
   bits ev : EV_SYN EV_KEY

/dev/input/event8
   bustype : BUS_USB
   vendor  : 0x3eb
   product : 0x8816
   version : 273
   name    : "Atmel Atmel maXTouch Digitizer"
   phys    : "usb-0000:00:1a.0-1.5/input0"
   uniq    : ""
   bits ev : EV_SYN EV_KEY EV_ABS

/dev/input/event9
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel PCH HDMI/DP,pcm=3"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event10
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel PCH Mic"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event11
   bustype : (null)
   vendor  : 0x0
   product : 0x0
   version : 0
   name    : "HDA Intel PCH Headphone"
   phys    : "ALSA"
   bits ev : EV_SYN EV_SW

/dev/input/event12
   bustype : BUS_I8042
   vendor  : 0x2
   product : 0xe
   version : 0
   name    : "ETPS/2 Elantech Touchpad"
   phys    : "isa0060/serio1/input0"
   bits ev : EV_SYN EV_KEY EV_ABS

/dev/input/event13
   bustype : BUS_USB
   vendor  : 0x2232
   product : 0x1045
   version : 89
   name    : "WebCam SC-10HDP12631N"
   phys    : "usb-0000:00:1a.0-1.4/button"
   bits ev : EV_SYN EV_KEY

evtest /dev/input/event8

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x3eb product 0x8816 version 0x111
Input device name: "Atmel Atmel maXTouch Digitizer"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   3355
      Min        0
      Max     4095
      Resolution      12
    Event code 1 (ABS_Y)
      Value   1550
      Min        0
      Max     4095
      Resolution      21
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max       15
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max      255
      Resolution      10
    Event code 49 (ABS_MT_TOUCH_MINOR)
      Value      0
      Min        0
      Max      255
      Resolution      10
    Event code 52 (ABS_MT_ORIENTATION)
      Value      0
      Min        0
      Max        1
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max     4095
      Resolution      12
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max     4095
      Resolution      21
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
    Event code 60 (?)
      Value      0
      Min        0
      Max     4095
      Resolution      12
    Event code 61 (?)
      Value      0
      Min        0
      Max     4095
      Resolution      21
Properties:
  Property type 1 (INPUT_PROP_DIRECT)

以下是我触摸屏幕时的一些示例数据evtest

单次触摸:

Event: time 1376299024.902314, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 23
Event: time 1376299024.902314, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 292
Event: time 1376299024.902314, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1678
Event: time 1376299024.902314, type 3 (EV_ABS), code 60 (?), value 292
Event: time 1376299024.902314, type 3 (EV_ABS), code 61 (?), value 1678
Event: time 1376299024.902314, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 1
Event: time 1376299024.902314, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1376299024.902314, type 3 (EV_ABS), code 0 (ABS_X), value 292
Event: time 1376299024.902314, type 3 (EV_ABS), code 1 (ABS_Y), value 1678
Event: time 1376299024.902314, -------------- SYN_REPORT ------------
Event: time 1376299024.959259, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1376299024.959259, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1376299024.959259, -------------- SYN_REPORT ------------

两个手指:

Event: time 1376299060.941027, -------------- SYN_REPORT ------------
Event: time 1376299065.006084, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 25
Event: time 1376299065.006084, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 409
Event: time 1376299065.006084, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1227
Event: time 1376299065.006084, type 3 (EV_ABS), code 60 (?), value 409
Event: time 1376299065.006084, type 3 (EV_ABS), code 61 (?), value 1227
Event: time 1376299065.006084, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1376299065.006084, type 3 (EV_ABS), code 0 (ABS_X), value 409
Event: time 1376299065.006084, type 3 (EV_ABS), code 1 (ABS_Y), value 1227
Event: time 1376299065.006084, -------------- SYN_REPORT ------------
Event: time 1376299065.043034, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 1
Event: time 1376299065.043034, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 26
Event: time 1376299065.043034, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 457
Event: time 1376299065.043034, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2799
Event: time 1376299065.043034, type 3 (EV_ABS), code 60 (?), value 457
Event: time 1376299065.043034, type 3 (EV_ABS), code 61 (?), value 2799
Event: time 1376299065.043034, -------------- SYN_REPORT ------------
Event: time 1376299065.114060, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 0
Event: time 1376299065.114060, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1376299065.114060, type 3 (EV_ABS), code 0 (ABS_X), value 457
Event: time 1376299065.114060, type 3 (EV_ABS), code 1 (ABS_Y), value 2799
Event: time 1376299065.114060, -------------- SYN_REPORT ------------
Event: time 1376299065.122075, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 1
Event: time 1376299065.122075, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1376299065.122075, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1376299065.122075, -------------- SYN_REPORT ------------

答案1

我发现了如何使用以下方法将正确的触摸屏正确地映射到屏幕上:

xinput map-to-output <device> <output name>

要查找设备 ID,请使用

xinput list

要查找屏幕名称,请使用

xrandr

我只需要找出如何在连接外部显示器时自动触发此功能。您还可以编写一个小脚本来获取正确的设备 ID 并运行命令。

对于点击问题,我认为多点触控可以识别,我可以用 3 根手指调整窗口大小和移动窗口,但有时单击也不起作用。我点击以单击,但它表现得好像我只是移动了光标,而不是真正单击。奇怪的是,这种情况有时会发生,我不知道是什么让它开始和停止。

(找到解决方案https://wiki.archlinux.org/index.php/Touchscreen

答案2

首先,确保您的硬件声称支持多点触摸。

我不确定你想用触摸屏做什么,但在 Ubuntu 中,没有多少应用程序真正支持Xinput2.2多点触摸协议

那么让我们让触摸屏工作起来。

lsinput

您可能需要下载这个,下载后,您将能够生成所有通用输入事件设备的输出,这些设备通过 evdev 层提供输入。获取此输出并记下 Atmel 触摸设备的位置

sudo lsinput

事件测试

evtest 允许我们检查您的设备正在将哪些事件推送到 evdev 层。您还必须下载此程序,然后在您之前记下的设备位置上运行它

evtest /dev/input/eventxx

输出结果将告诉您从多点触控创建了哪种事件。对于真正的多点触控,您需要创建以下事件:

ABS_MT_TRACKING_ID
ABS_MT_POSITION_X
ABS_MT_POSITION_Y

这些是您的真正的多点触控事件,如果您看不到这些,那么您将无法运行 Ubuntu 多点触控应用程序。

如果您看到以下事件,则可能仅模拟鼠标移动。

ABS_X
ABS_Y

多点触控应用程序

在 Ubuntu 中,只有少数应用程序支持多点触控。我不会解释如何设置和运行它们,但我会给你一些框架的名称,以便你做更多的研究。

Kivy - 在 evdev 层支持多点触控。一个包含许多示例应用和游戏的 Python 应用程序框架

Qt——一个大型应用程序开发框架,具有有限的手势支持,但允许开发丰富的触摸 UI。

libAVG-还没有真正使用过这个,但是它有很多很棒的示例应用程序可以运行和使用。

编辑:事情可能不会完美无缺,这是意料之中的,但这些工具将有助于识别问题。回复任何这些命令的输出,我会帮助解释它们

相关内容