- Thread Author
- #1
There is a simple way to make the middle mouse button (the scroll) work in a similar way like it works in Windows OS. First create a bash script called middle_clicl_to_scroll.sh
nano ~/.config/autostart/middle_click_to_scroll.sh
Most people use this and it's OK. It works while holding the scroll button and pushing the mouse up and down. You can save this script inside your autostart folder. In Kubuntu this is /home/username/.config/autostart/
nano ~/.config/autostart/middle_click_to_scroll.sh
Bash:
#!/bin/bash
# Get device IDs of all devices containing "pointer"
pointer_ids=($(xinput list | grep pointer | perl -p -e 's@.*?id=(\d+).*@\1@'))
for pointer_id in "${pointer_ids[@]}"; do
# If the pointer supports scroll method, set middle click to scroll
if xinput list-props "$pointer_id" | grep 'Scroll Method Enabled' &>/dev/null; then
xinput set-prop "$pointer_id" 'libinput Scroll Method Enabled' 0 0 1
fi
done
Most people use this and it's OK. It works while holding the scroll button and pushing the mouse up and down. You can save this script inside your autostart folder. In Kubuntu this is /home/username/.config/autostart/
Last edited by a moderator: