You are not logged in.

#1 2013-10-21 13:49:04

perdouille
Member
Registered: 2013-08-09
Posts: 9

Bind every mouse button ?

Hello !
I'm new to ArchLinux, and I want to bind every buttons of my mouse, to control music on Spotify (Like "Start music, switch to next music, ...")

OcqL1sF.jpg

I wanna bind the two button on the side to "next - previous music", the button at the middle of the mouse for "Start / stop music", and two button around the wheel for the volume.
I found most buttons, with xbindkeys, but I can't bind the two buttons around the wheel...
They are already binded for the speed of the mouse, and when I try to see with xev the "button number", it doesn't work... (Other buttons give me a button number to bind them with xbindkeys, but not buttons around the wheel)

Any idea ?

(Another question : Is there a way to change the volume of an application with command line ? (PulseAudio) like : Pulseaudio --volume -5 --Application "Spotify Premium - Linux Preview" )

Thanks !

My /bin/musicSpotify.sh :

 
#!/bin/sh

case $1 in
   "play")
       key="XF86AudioPlay"
       ;;
   "next")
       key="XF86AudioNext"
       ;;
   "prev")
       key="XF86AudioPrev"
       ;;
   *)
       echo "Usage: $0 play|next|prev"
       exit 1
        ;;
esac
xdotool key --window $(xdotool search --name "Spotify (Premium )?- Linux Preview"|head -n1) $key
exit 0

My .xbindkeysrc

"/bin/musicSpotify.sh play"
    m:0x0 + c:172
    XF86AudioPlay

"/bin/musicSpotify.sh next"
    m:0x10 + c:171
    XF86AudioNext

"/bin/musicSpotify.sh prev"
    m:0x0 + c:173
    XF86AudioPrev

"/bin/musicSpotify.sh play"
    b:10

"/bin/musicSpotify.sh prev"
    b:8

"/bin/musicSpotify.sh next"
    b:9

Last edited by perdouille (2013-10-21 14:17:10)

Offline

#2 2013-10-21 19:00:16

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Bind every mouse button ?

Offline

#3 2013-10-21 19:51:30

perdouille
Member
Registered: 2013-08-09
Posts: 9

Re: Bind every mouse button ?

I just tried:

[perdouille@ArchLinux:[~] sudo ./g5hack /dev/usb/hiddev0 3
g5hack version: 0.0.7

hiddev driver version is 1.0.4
vendor 0x046d product 0xc245 version 0x6900 has 1 application and is on bus: 1   devnum: 2   ifnum: 1

but It doesn't seems to work (Tried with sudo ./g5hack /dev/usb/hiddev1 3 but doesn't work too ...)

Offline

#4 2013-10-23 15:58:44

perdouille
Member
Registered: 2013-08-09
Posts: 9

Re: Bind every mouse button ?

Bump ?

Offline

Board footer

Powered by FluxBB