tags:

views:

13

answers:

1

I want to set up my mouse buttons to perform different functions if I press and hold them, or if I press them while holding down shift/alt/ctrl.

As some trivial examples:

  • Shift-leftMouseButton = "back" in firefox history?
  • Shift-rightMouseButton = go forward in firefox,
  • Press-and-hold right mouse button = some other action in firefox (eg, move to opposite screen and maximize).

EDIT:

I forgot to mention I have 5 mouse buttons. (Microsoft Wireless Laser Mouse 6000)

+1  A: 

Well, you can map those combinations to other key combinations, as below.

shift + left mouse -> alt + left

+LBUTTON::SendInput,!{LEFT}

shift + right mouse -> alt + right

+RBUTTON::SendInput,!{RIGHT}

Beyond that, you can execute a series of commands, if you wanted to also, say, activate a Firefox window first.

To do the press-and-hold, you'd have to use a timer and it is a bit more complicated. You'd also need to figure out how you want to execute "some other action." Do you have a set of keystrokes that would achieve what you say? For example, I have CTRL + ` mapped to switch screens, so I'd send that and then Windows key + up to do it.

Jay