565 tutoriels disponibles
Chercher un tutoriel
Bienvenue
sur Shareannonce
 
Settings apple magicmouse on ubuntu
Ecrit par: Shareannonce
Date création:  16-12-2018
Nombre de vues:  6061
Catégorie:  informatique > developpement > linux
Note: 
 
   Tutoriel N° 2c7

Settings speed, scroll, sensitivity, deceleration for magicmouse on ubuntu


nano ~/.config/autostart/mouse.desktop

[Desktop Entry]
Name=Decrease mouse sensitivity
Exec=xset m 1/2 8
Type=Application
Comment[en_US]=Use xset to set mouse params
Comment=Use xset to set mouse params


to get the set value:

xset -q | grep -A1 Pointer

Pointer Control:
acceleration: 1/2 threshold: 8

--------------------------------------------------------------------------------------------------------------

sudo apt-get install imwheel

nano mousewheel.sh

#!/bin/bash
rm -rf ~/.imwheelrc
cat >~/.imwheelrc<<EOF
".*"
None, Up, Button4, 1
None, Down, Button5, 1
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
EOF
cat ~/.imwheelrc
imwheel -kill


   Launch sh mousewheel.sh the first time
   Add it at the startup of linux

sh mousewheel.sh

--------------------------------------------------------------------------------------------------------------

Set up manually (config lost with boot):

xinput set-button-map 14 1 1 3 4 5 0 0

xinput get-button-map 14
1 1 3 4 5 0 0

Bouton Gauche Milieu Droit Haut Bas Gauche Droite

To change the sensitivity/acceleration, use the command

xinput --set-ptr-feedback "device_id" accelNum accelDenom threshold

xinput --set-ptr-feedback "10" 30 5 2

sudo nano /usr/share/X11/xorg.conf.d/50-mouse-acceleration.conf

Lubuntu 16.04

Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Souris de apple" # Product name from 'xinput list'
Driver "evdev" # From '/var/log/Xorg.0.log' after mouse connected
Option "ConstantDeceleration" "2"
Option "VelocityScale" "1"

Option "ButtonMapping" "1 1 3 4 5 0 0"
EndSection



Lubunru 18.04

Section "InputClass"
Identifier "Apple Magic Mouse" # This can be anything
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
MatchProduct "Souris de apple" # Product name from 'xinput list'
Driver "evdev" # From '/var/log/Xorg.0.log' after mouse connected
Option "AccelerationProfile" "-1"
Option "AccelerationScheme" "none"
Option "AccelSpeed" "-0.8"
Option "ButtonMapping" "1 1 3 4 5 0 0"

EndSection



--------------------------------------------------------------------------------------------------------------

Set up manually (config lost with boot):

Lubuntu 16.04
xinput set-prop 14 'Device Accel Constant Deceleration' 2.0

Lubuntu 18.04
xinput set-prop 14 "libinput Accel Speed" -0.8

Check config with:

Find magic mouse id (14 for me)
xinput list

Souris de apple id=14 [slave pointer (2)]


xinput list-props 14

Device 'Souris de apple':
Device Enabled (140): 1
Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (271): 0
Device Accel Constant Deceleration (272): 2.000000
Device Accel Adaptive Deceleration (273): 1.000000
Device Accel Velocity Scaling (274): 1.000000
Device Product ID (261): 1452, 781
Device Node (262): "/dev/input/event8"
Evdev Axis Inversion (523): 0, 0
Evdev Axes Swap (525): 0
Axis Labels (526): "Rel X" (150), "Rel Y" (151), "Rel Horiz Wheel" (521), "Rel Vert Wheel" (522)
Button Labels (527): "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147), "Button Horiz Wheel Left" (148), "Button Horiz Wheel Right" (149)
Evdev Scrolling Distance (528): 1, 1, 1
Evdev Middle Button Emulation (529): 0
Evdev Middle Button Timeout (530): 50
Evdev Third Button Emulation (531): 0
Evdev Third Button Emulation Timeout (532): 1000
Evdev Third Button Emulation Button (533): 3
Evdev Third Button Emulation Threshold (534): 20
Evdev Wheel Emulation (535): 0
Evdev Wheel Emulation Axes (536): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (537): 10
Evdev Wheel Emulation Timeout (538): 200
Evdev Wheel Emulation Button (539): 4
Evdev Drag Lock Buttons (540): 0


write in a terminal:

xinput set-prop 14 "Device Accel Constant Deceleration" 2

Check config with:

systool -avm hid_magicmouse


Parameters:
emulate_3button = "N"
emulate_scroll_wheel= "Y"
report_undeciphered = "N"
scroll_acceleration = "N"
scroll_speed = "1"


Set up manually: (config lost with boot):

sudo rmmod hid_magicmouse

sudo nano /etc/modprobe.d/magicmouse.conf

options hid_magicmouse emulate_3button=0 scroll_acceleration=0 scroll_speed=1
scroll_acceleration=1


you can modify directly here:
cd /sys/module/hid_magicmouse/parameters
sudo nano/sys/module/hid_magicmouse/parameters/ emulate_3button
sudo nano /sys/module/hid_magicmouse/parameters/emulate_scroll_wheel
sudo nano /sys/module/hid_magicmouse/parameters/report_undeciphered
sudo nano /sys/module/hid_magicmouse/parameters/scroll_acceleration
sudo nano /sys/module/hid_magicmouse/parameters/scroll_speed

In firefox url:
about:config
search mouse

mousewheel.min_line_scroll_amount: 10


mousewheel.default.delta_multiplier_y 400


In firefox preferences:
Select: Use autoscrolling, Use smooth scrolling

source:
http://sneclacson.blogspot.com/2016/09/using-apple-magic-mouse-with-ubuntu-1604.html



 
 
   Autres tutoriels de la même catégorie >
 
ShareAnnonce version 2.0 Tous droits reserves. | Condition d'utilisation | Contact