Answers:
只要您将触摸屏检测为无聊的输入设备,就可以使用进行操作xinput
。使用此工具,您可以定义新的主指针(类似于一个鼠标指针的虚拟指针),并从中分离并附加从属指针(实际的硬件设备)。
所以你要做的就是
这样做类似于:
创建新的主指针:
$ xinput create master touchy
这将创建一个新的主键盘/指针对,其中键盘称为»触摸键盘«和指针»touchy指针«:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)]
⎜ ↳ My Cool™ Touchscreen id=14 [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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]
↳ HID 046a:0011 id=13 [slave keyboard (3)]
⎡ touchy pointer id=15 [master pointer (16)]
⎜ ↳ touchy XTEST pointer id=17 [slave pointer (15)]
⎣ touchy keyboard id=16 [master keyboard (15)]
↳ touchy XTEST keyboard id=18 [slave keyboard (16)]
将触摸屏从属指针移到新的主指针上
在此示例中,我假设»My Cool™触摸屏«是要使用的设备(id=14
):
$ xinput reattach 14 15
这将导致以下结果:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (15)]
⎣ 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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]
↳ HID 046a:0011 id=13 [slave keyboard (3)]
⎡ touchy pointer id=15 [master pointer (16)]
⎜ ↳ My Cool™ Touchscreen id=14 [slave pointer (2)]
⎜ ↳ touchy XTEST pointer id=17 [slave pointer (15)]
⎣ touchy keyboard id=16 [master keyboard (15)]
↳ touchy XTEST keyboard id=18 [slave keyboard (16)]
现在,您的触摸屏应该像一个单独的指针设备。
xicursorset
在KDE下对我不起作用,没有任何反应。有任何想法吗?