#Make button of a mouse hold on click and

23 messages · Page 1 of 1 (latest)

vagrant basin
#

Hello, I have a Rival 3 and I wanted to bind button 4 to button 1, and make it so that it's pressed when I click it, and will release only on the next click. I was able to achieve this using the steelseries app on windows. I found a Linux alternative (https://flozz.github.io/rivalcfg/devices/rival3.html#mapping-special-actions) but I don't understand how to do that. I've read there that my mouse doesn't support this natively, and with the official software, it just runs some background scripts. PS: my mouse settings don't save between PCs, so I can't set it up on windows and then use on Linux. any ideas?

#

Only thing I've been able to do is map button4 to button1, but it functions like a regular button currently, I can't figure out how to make it hold.

dark lake
#

Technically, you can achieve this with very low-level X11 hackery. There might be tools for it. And that is the extent of my knowledge on this.

low hinge
#

There's ckb-next but it's for corsair and rgb devices, no idea if it can be used in your case

vagrant basin
#

i found this little script on the internet, and it works exactly how i want it to be

#
# Path to a temporary file that will store the state
STATE_FILE="/tmp/mouse_button_state"

# Check if the state file exists
if [ ! -f "$STATE_FILE" ]; then
    # If the file doesn't exist, create it with the state "up"
    echo "up" > "$STATE_FILE"
fi

# Read the current state
STATE=$(cat "$STATE_FILE")

# Toggle the state
if [ "$STATE" = "up" ]; then
    # If the state is "up", change to "down" and press the left mouse button
    xdotool mousedown 1
    echo "down" > "$STATE_FILE"
else
    # If the state is "down", change to "up" and release the left mouse button
    xdotool mouseup 1
    echo "up" > "$STATE_FILE"
fi


#

now, everytime i run it, i get this pop-up

#

i bind the button4 key to F14

#

then in system settings, bind the script to F14 (i get the f14 key by clicking the mouse :p)

#

pretty unconventional but solved

vagrant basin
scenic cairn
#

first
what OS
what DE

vagrant basin
scenic cairn
vagrant basin
scenic cairn
vagrant basin
vagrant basin
#

@scenic cairn

scenic cairn
#

I dont know what problem u r having but this is the way to solve it

vagrant basin
#

settings mouse and then?

vagrant basin
vagrant basin