Make the middle mouse button behave as a double-click in Windows 7?

What is the best, lightest-weight way to make the middle mouse button (i.e. clicking the scroll wheel) behave as a double-left-click in Windows 7? I want this to be universal, so that other programs don't ever see the middle-click, they just see a double-left-click.

I used to do it under Windows XP with Logitech SetPoint drivers but it was always an ugly solution - installing a huge (> 50 MB!) binary just to enable one simple little bit of functionality.


Autohotkey is a light solution, with the script:

*MButton::SendInput {Click 2}

You can even compile it to an executable, which weighs about 200KB in disk space and 2.2MB1 in memory. It's also quite easy to add to startup, and is portable.


I personally prefer to use X-Mouse Button Control due to ease of configuration. Simply assign the Middle Button to Double Click Drag. The advantage is it keeps the second click held as long as the middle button is held, which ensures greater compatibility - it should perform exactly the same way as double clicking normally.

Screenshot of XMBC
Click for full size

It's possible to simulate such an action in AHK, but more difficult - if you wish for such an AHK solution, you can let me know in a comment. The above AHK script will not respond correctly to holding the button down - it will simply double click and release.

X-Mouse Button Control weighs about 3MB in disk space and 3MB1 in memory. It is also optionally portable.


Both AHK and XMBC can accomplish this, and both can be set to have application specific profiles. XMBC is more intuitive, if you wish to modify other mouse buttons without having to learn a scripting language, while AHK is undoubtedly more powerful. Both AHK and XMBC can simulate chains of keypresses, but AHK allows for more complex operations and decision making.


As an aside, AHK will trip PunkBuster (a certain anti-cheating system used by quite a few games), while XMBC will not - at least, at the moment.


1The memory usage is on my computer, Windows 7 x64. It may vary slightly from computer to computer, but the variation shouldn't be much.