Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way in Linux that I can program the mouse to do certain things for certain programs? Like if I press the middle mouse button in one program it will act as an enter key and if I do the same thing in another program it will send a different keystroke? I'm using Gnome with compiz in Ubuntu 10.04.

share|improve this question
    
Please note that middle mouse button already has purpose in unix systems. It pastes highlighted text. Still it's an interesting question. –  AndrejaKo Jul 31 '10 at 8:53
    
I was doing this kind of thing in Windows before I switched to Linux. –  tony_sid Jul 31 '10 at 8:56
    
Yes, you can. How depends on your window manager or desktop environment (e.g., gnome, kde, fvwm, ...); add this information to your question. But keep in mind that most unix programs are designed for three-button mice and already do something useful with the middle mouse button. –  Gilles Jul 31 '10 at 9:02
    
The programs that I'm interested in using this feature for don't use the middle mouse button. In the program I was using in Windows I just remapped the middle mouse button for a few programs and left it at default for the rest. It detect what program is active and that's how it decides whether to remap or not. It's not part of the OS. It's a program I downloaded somewhere that sits in the tray. It's called X-mouse. –  tony_sid Jul 31 '10 at 12:38

1 Answer 1

up vote 0 down vote accepted

I think the imwheel utility can do that. Not having tried it myself, there's a document describing it here: https://help.ubuntu.com/community/ManyButtonsMouseHowto

share|improve this answer

Your Answer

 
discard

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.