Chrome automatyczne przewijanie scroll

Tematy związane z oprogramowaniem, instalacją, konfiguracją
Misiek440
Posty: 74
Rejestracja: 07 lipca 2009, 12:32

Chrome automatyczne przewijanie scroll

Post autor: Misiek440 »

Witam, mam pytanie jak w chrome na Linuksie zrobić tak aby po wciśnięciu Scrolla (środkowy klawisz) można stronę przewijać ruchem myszki jak na Windowsie?
Awatar użytkownika
dedito
Moderator
Posty: 3512
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Re: Chrome automatyczne przewijanie scroll

Post autor: dedito »

Wypróbuj wskazówek z tej strony: http://unix.stackexchange.com/questions ... -held-down
use the xinput program (I don't know if there's a GUI frontend for it). First, run the following command to see the name of your pointing device:

$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Generic USB Mouse id=8 [slave pointer (2)]
⎜ ↳ Macintosh mouse button emulation id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ USB Keyboard id=9 [slave keyboard (3)]
For example, in the output above, the pointer device is Generic USB mouse. You can run the following command to list the properties that can be tuned:

xinput --list-props 'Generic USB Mouse'
The set of properties you're looking for are the “Evdev Wheel Emulation” ones. With the following settings, when the middle mouse button (button 2) is pressed, moving the mouse sends wheel events (4=up, 5=down, 6=left, 7=right).

xinput --set-prop 'Generic USB Mouse' 'Evdev Wheel Emulation' 1
xinput --set-prop 'Generic USB Mouse' 'Evdev Wheel Emulation Button' 2
xinput --set-prop 'Generic USB Mouse' 'Evdev Wheel Emulation Axes' 6 7 4 5
You may want to tweak other parameters (inertia, timeout).

You can put these commands in a script. Add #!/bin/sh as the very first line, and make the script file executable (e.g. chmod +x ~/bin/activate-wheel-emulation.sh). Then add that script to the list of commands to run when your session starts (gnome-session-properties lets you configure that).

If you have root access and you want to make the change for all users (acceptable on a home machine), it's simpler to do it via the X.org server configuration file. As root, create a file called /etc/X11/xorg.conf.d/wheel-emulation.conf containing settings for the mouse driver. The settings are the same but they're organized a bit differently.

Section "InputClass"
Identifier "Wheel Emulation"
MatchProduct "Generic USB Mouse"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "2"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection
Lub użyj wtyczki do Chrome https://chrome.google.com/webstore/deta ... kejpdionan
ODPOWIEDZ