Potreboval jsem zpomalit ukazetel mysi, ale o extremni hodnoty. Graficke klikatko v Ubuntu, ani v Mintu mi nedovolilo nastavit tak velke hodnoty zpomaleni, proto jsem byl nucen pouzit xinput utilitu.
Graficke klikatko pro nastaveni mysi v Mintu 16
Nejdriv je potreba zjistit dostupna vstupni zarizeni:
martin@martin:~$ xinput --list --short ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=13 [slave pointer (2)] ⎜ ↳ 2.4G Wireless Optical Mouse 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)] ↳ Video Bus id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Asus WMI hotkeys id=11 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ↳ LiteON HP Basic USB Keyboard id=10 [slave keyboard (3)] martin@martin:~$
jak je videt z vypisu, pocitac je notebook – je pritomny touchpad. Nas bude zajimat pripojena USB mys „2.4G Wireless Optical Mouse„.
Pro zacatek si o mysi zjistime blizsi informace:
martin@martin:~$ xinput --list-props "2.4G Wireless Optical Mouse" Device '2.4G Wireless Optical Mouse': Device Enabled (134): 1 Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (259): 0 Device Accel Constant Deceleration (260): 1.000000 Device Accel Adaptive Deceleration (261): 1.000000 Device Accel Velocity Scaling (262): 10.000000 Device Product ID (254): 7511, 8 Device Node (255): "/dev/input/event12" Evdev Axis Inversion (552): 0, 0 Evdev Axes Swap (554): 0 Axis Labels (555): "Rel X" (144), "Rel Y" (145), "Rel Horiz Wheel" (512), "Rel Vert Wheel" (513) Button Labels (556): "Button Left" (137), "Button Middle" (138), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141), "Button Horiz Wheel Left" (142), "Button Horiz Wheel Right" (143), "Button Side" (547), "Button Extra" (548), "Button Forward" (549), "Button Back" (550), "Button Task" (551), "Button Unknown" (546), "Button Unknown" (546), "Button Unknown" (546), "Button Unknown" (546) Evdev Middle Button Emulation (557): 0 Evdev Middle Button Timeout (558): 50 Evdev Third Button Emulation (559): 0 Evdev Third Button Emulation Timeout (560): 1000 Evdev Third Button Emulation Button (561): 3 Evdev Third Button Emulation Threshold (562): 20 Evdev Wheel Emulation (563): 0 Evdev Wheel Emulation Axes (564): 0, 0, 4, 5 Evdev Wheel Emulation Inertia (565): 10 Evdev Wheel Emulation Timeout (566): 200 Evdev Wheel Emulation Button (567): 4 Evdev Drag Lock Buttons (568): 0 martin@martin:~$
A nyni sestavime zpomalovaci prikaz (nastavime patricnou hodnotu):
vychozi hodnota je 1, cim vyssi cislo, tim pomaleji se bude mys hybat.
martin@martin:~$ xinput --set-prop "2.4G Wireless Optical Mouse" "Device Accel Constant Deceleration" 5 martin@martin:~$ xinput --list-props "2.4G Wireless Optical Mouse" | grep "Device Accel Constant Deceleration" Device Accel Constant Deceleration (260): 5.000000 martin@martin:~$ xinput --set-prop "2.4G Wireless Optical Mouse" "Device Accel Constant Deceleration" 1 martin@martin:~$ xinput --list-props "2.4G Wireless Optical Mouse" | grep "Device Accel Constant Deceleration" Device Accel Constant Deceleration (260): 1.000000 martin@martin:~$
a je to!
Po opetovenem prihlaseni bude nastaveni ztraceno. Jestli se ma zachovat, musime ho nekam ulozit. Primo se nabizi pouzit soubor ~/.xsession . Vlozime do neho:
#!/bin/sh xinput --set-prop "2.4G Wireless Optical Mouse" "Device Accel Constant Deceleration" 5
a nastavime mu pravo spusteni (chmod +x ~/.xsession). Nyni by se nastaveni melo aplikovat automaticky po prihlaseni uzivatele.