XI2
Izvor: HrOpenWiki
XI2 je kratica od X Input Extension 2.0, a omogućuje simultano korištenje više ulaznih uređaja (npr. miševa i tipkovnica) na istom računalu.
Kako koristiti?
Ovo je za sad moguće samo s Fedorom 12 (koja uključuje libXi-2), a ubrzo će biti moguće i s drugim distribucijama (kad uključe spomenutu komponentu).
Naredba
xinput list --short
ispisat će trenutno stanje koje bi trebalo izgledati ovako nekako:
[root@localhost ~]# xinput list --short ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Macintosh mouse button emulation id=7 [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse id=8 [slave pointer (2)] ⎜ ↳ EL USB Keyboard id=9 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ EL USB Keyboard id=6 [slave keyboard (3)] ↳ Power Button id=10 [slave keyboard (3)] ↳ Power Button id=11 [slave keyboard (3)]
A nakon uštekavanja npr. drugog miša:
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Macintosh mouse button emulation id=7 [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse id=8 [slave pointer (2)] ⎜ ↳ EL USB Keyboard id=9 [slave pointer (2)] ⎜ ↳ HID 04b3:3107 id=12 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ EL USB Keyboard id=6 [slave keyboard (3)] ↳ Power Button id=10 [slave keyboard (3)] ↳ Power Button id=11 [slave keyboard (3)]
U ovom slučaju taj novi miš zove se
HID 04b3:3107
Potrebno je prvo stvoriti novi master:
xinput --create-master "drugi"
i na njega "zakačiti" drugi miš:
xinput --reattach "HID 04b3:3107" "drugi pointer"
gdje je "HID 04b3:3107" ime uređaja i tako da gornju naredbu treba prilagoditi konkretnom slučaju (imenu).
Stanje nakon svih koraka:
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Macintosh mouse button emulation id=7 [slave pointer (2)] ⎜ ↳ Logitech USB-PS/2 Optical Mouse id=8 [slave pointer (2)] ⎜ ↳ EL USB Keyboard id=9 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ EL USB Keyboard id=6 [slave keyboard (3)] ↳ Power Button id=10 [slave keyboard (3)] ↳ Power Button id=11 [slave keyboard (3)] ⎡ drugi pointer id=13 [master pointer (14)] ⎜ ↳ HID 04b3:3107 id=12 [slave pointer (13)] ⎜ ↳ drugi XTEST pointer id=15 [slave pointer (13)] ⎣ drugi keyboard id=14 [master keyboard (13)] ↳ drugi XTEST keyboard id=16 [slave keyboard (14)]
Za uklanjanje cijelog postava dovoljno je ukloniti master:
xinput --remove-master "drugi pointer"