Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

TL;DR version

Does anyone know how to assign a command to a mouse action (e.g. holding middle-mouse-button)?

Like this: hold down middle-mouse-button, command #1, release middle-mouse-button, command #2

Long version

At this point I'm using Mangler (Ventrilo-client) to chat, and I have my middle-mouse-button button assigned as "push to speak". But, here's the thing, I like to play music at the same time (Rhythmbox). So I'd like to mute Rhythmbox while I'm talking on Mangler.

I have already found the commands to mute/unmute Rhythmbox using rhythmbox-client --mute and rhythmbox-client --unmute, but I haven't found any way to attach a command to a mouse action.

If someone manages to use rhythmbox-client --set-volume to temporarily lower the volume when someone is talking on Mangler; that would be awesome!

share|improve this question
Since I don't know the answer, I will just add the comment that Mumble will mute your other applications when you PTT for you. Or when someone else talks for that matter – EBGreen Aug 19 '11 at 18:24
up vote 0 down vote accepted

IronAHK can do this. Just create the marco that you want, and then bind it to the middle mouse. You should be able to bind it to the on key up and on key down events.

share|improve this answer
Updated for ubuntu, sorry, didn't see the tag before. – soandos Aug 19 '11 at 18:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.