This forum is in permanent archive mode. Our new active community can be found here.

Binding program-based keys to mouse, possible?

edited July 2010 in Technology
I want to have some of the buttons on my mouse do different things depending on what program I'm in. I would like to have it be based on where my cursor is, if possible, as the programs may just be in a window. For example, I have a word processor on one half of my screen and a web browser on the other side. When my cursor is over the web browser, I want the thumb keys to be the normal forward and back buttons but when I hover over to the word processor side I want it to be for something else like ctrl+s.

Comments

  • edited July 2010
    One thing you can do is buy the same mouse that Rym has, the Steelseries Xai.

    This mouse allows you to bind any mouse button to anything. It's all done inside the mouse itself. So you can tell it that the middle button should be z, and you will then be able to type the letter z with the mouse. The mouse can hold a certain number of profiles. So you can create a different profile for each application. Then you just have to switch the profile when you switch applications. It won't automatically know what app you are using. Not perfect, but kind of close.

    The only real option is to have applications that let you change the mouse bindings. For example, most PC games.

    My real advice to you, which I know doesn't answer your question, is not to do this. It's a stupid idea. I learned through many years of computing experience that it is easier to change yourself than it is to change the computer. Instead of trying to reconfigure the computer to do weird things, practice the defaults. You are going to use a lot of computers in your life. If you become used to some weird special configuration, you will have problems using other computers. Instead, change yourself so that your preferences are equal to the default preferences. Then you will be awesomely efficient on every computer. Not only that, but setting up new computers will be way easy, since you won't need to change anything. Your computer will also be super clean and not full of weird changes that might break things.

    This is one of the main reasons I use vim as my text editor of choice. It's on every machine. No matter where I go, vim will also be there. If I get used to something like Visual Studio, what am I going to do when it's not available? If I master vim, I can be awesome on any computer, even if my work gives me a Mac I don't want.

    My final advice is to stay away from the mouse. The mouse is evil. Use the mouse as little as possible. Master the keyboard. Try to keep your hands on the keyboard as much as possible. Instead of changing the computer, change yourself by improving your keyboarding. Learn the default keyboard shortcuts, and you will be way more efficient in the long run than any weird configurations you might try to come up with.

    I used to spend hours and hours setting options on different applications and reconfiguring my computer. The result was that I spent all this time trying to reconfigure the computer, and almost no time actually using the computer to get anything done. Now I use 99% default configurations. I don't change anything except turning caps lock key into ctrl when my happy hacking keyboard is not present. The result is that I actually use my computer now.
    Post edited by Apreche on
  • edited July 2010
    One thing you can do is buy the same mouse that Rym has, the Steelseries Xai.

    This mouse allows you to bind any mouse button to anything. It's all done inside the mouse itself. So you can tell it that the middle button should be z, and you will then be able to type the letter z with the mouse. The mouse can hold a certain number of profiles. So you can create a different profile for each application. Then you just have to switch the profile when you switch applications. It won't automatically know what app you are using. Not perfect, but kind of close.
    I think most gaming mice offer this functionality, though it's typically done with drivers. My DeathAdder offers functionality for single keys and macros on the mouse buttons.

    Application-specific functions are unheard of as far as I know, though. Where possible, your best bet is probably to configure the applications themselves to respond differently to the buttons rather than the other way around.
    Post edited by lackofcheese on
  • I just have my extra mouse buttons bound as buttons 4 & 5 and let the program in question handle the rest. Chrome sees it as back while in LD2 I have button 4 bound to talk so I can hold it down easily.
  • When my cursor is over the web browser, I want the thumb keys to be the normal forward and back buttons but when I hover over to the word processor side I want it to be for something else like ctrl+s.
    Do you need it to work this way even if the window isn't in focus? If not, I'm sure Authotkey can do it.
  • edited July 2010
    One problem that really pisses me off is that I typically bind a mouse thumb button to push to talk with friends in Teamspeak 2, but if I'm using a browser or media player and push the button it ends up pressing back or forwards as well.

    The best solution with my DeathAdder is probably to bind the mouse buttons to keyboard keys, but the question is, which keys would be least obtrusive?
    Post edited by lackofcheese on
  • You'll probably be able to find some dead keys (Keys recognized by the OS but not physically on your keyboard.) you can bind it to.
  • I don't think I can, because the software uses a keypress to choose what to bind the mouse to.
  • edited July 2010
    Post edited by Pegu on
  • My Steelseries Xai is like a tiny god. In CounterStrike, for example, I have two modes: normal mode and sniper mode. The latter has lower sensitivity, no acceleration, and increased path straightening. (Normal mode has NO path straightening).

    Before you claim that this is cheating, remember that all mouse drivers straighten your mouse movements to some degree: you just have no control over it, and all mice are different. I turned it OFF for most of my play, but turned it UP for when I'm sniping. ^_^

    I could do more, but it straddles the line of cheating. For example, I could turn the vertical sensitivity way down in one mode, allowing head-track sniping pretty easily. I could have a button that locks the vertical axis while held. The scary part is basically that by doing this all in the mouse itself, there's no way to detect it. ;^)
  • edited July 2010
    [Let me just make a complete tangent to talk about how something I've got is so great.]
    Don't let adding anything useful to the conversation stop you.
    Post edited by Omnutia on
  • Don't let adding anything useful to the conversation stop you.
    My mouse gives me absolute control over its functionality, including program-specific bindings. If someone wants to use their mouse in customized ways, there is none better.
  • Why does it matter if what your mouse does is done in firmware or software?
    Also, that's a terrible mouse for doing this, it costs way too much.
  • Why does it matter if what your mouse does is done in firmware or software?
    Because you are likely to use your mouse on multiple computers. If you do it in software, you have to install a bunch of programs and config files on every computer to use before you game. If it's all in the mouse, you can plug and play on any computer on any OS.
    Also, that's a terrible mouse for doing this, it costs way too much.
    My keyboard costs more than that mouse. It's actually really cheap considering all that it does.
  • edited July 2010
    If you've got that kind of money, I ain't going to stop you. Just recognise that a tools superiority is a subjective thing and money is a factor.

    I suppose the Xai serves as a stop-gap between now and some kind of system wide Steam Cloud. For decadent people willing to pay silly amounts.
    Post edited by Omnutia on
  • How much is the mouse? My logitech G9 retailed for about 60-80$. I got it for 5$ when circuit city ran out of business. After playing around with it, I got it to recognize programs and to change the keys based on it. It actually works pretty well and recognizes what ever program is in focus so I can switch to other programs and have it change on the fly. It also stores the data on the mouse, which is nice.
Sign In or Register to comment.