🕵️‍♂️ Engage in discussions ANONYMOUSLY. NO REGISTRATION is required. 💬

✅ Registered accounts earn up to $25 per thread via PayPal and BTC. 🤑 Read more in News and Announcments! Unlock the ability to chat, share, send private messages and earn money per post in our community. Just register an account. It's Free!

SignUp Now!
  • 🕵️‍♂️ Engage in discussions ANONYMOUSLY. NO REGISTRATION is required. 💬 ✅ Registered accounts earn up to $25 per thread via PayPal and BTC. 🤑 Read more... Unlock the ability to chat, share, send private messages and earn money per post in our community. Just register an account. It's Free!

Guide Scroll in Linux the same way you do in Windows

Choose this one if you are writing a guide

w_G

Global Admin
Staff member
Joined
Aug 15, 2023
Messages
13
Credits
285
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

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:
Moderator
Joined
Aug 18, 2023
Messages
19
Credits
216
Yep and if you want to be an advanced mf you can do it with Python. Check out what
You must have 10 posts to see the links. Currently you had 0 posts.
.

I also modified the script a bit and made the installation a user friendly process. I'll share it here later.
 
Top