是否有可能在X窗口上有两个不同的焦点/焦点? (基本上同时使用两台鼠标和键盘与一台物理机器。如果是这样,这是如何实现的?
答案 0 :(得分:1)
使用最近的Xorg服务器,是的。您需要使用XInput Extension 2.0或更高版本。你还需要一个能够做到这一点的窗口管理器,而且我不确定哪个现代WM可以做到这一点。
文档:
关于Debian测试我甚至可以得到两个指针并立即开始使用它们(一个由USB鼠标控制,另一个由触摸板控制):
pzanoni@vicky:~$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ USB Optical Mouse id=11 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint 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)]
↳ Lite-On Technology USB Productivity Option Keyboard( has the hub in # 1 ) id=9 [slave keyboard (3)]
↳ Lite-On Technology USB Productivity Option Keyboard( has the hub in # 1 ) id=10 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)]
↳ ACPI Virtual Keyboard Device id=16 [slave keyboard (3)]
pzanoni@vicky:~$ xinput --create-master my 1 1
pzanoni@vicky:~$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ USB Optical Mouse id=11 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint 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)]
↳ Lite-On Technology USB Productivity Option Keyboard( has the hub in # 1 ) id=9 [slave keyboard (3)]
↳ Lite-On Technology USB Productivity Option Keyboard( has the hub in # 1 ) id=10 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)]
↳ ACPI Virtual Keyboard Device id=16 [slave keyboard (3)]
⎡ my pointer id=17 [master pointer (18)]
⎜ ↳ my XTEST pointer id=19 [slave pointer (17)]
⎣ my keyboard id=18 [master keyboard (17)]
↳ my XTEST keyboard id=20 [slave keyboard (18)]
pzanoni@vicky:~$ xinput --reattach "SynPS/2 Synaptics TouchPad" "my pointer"