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

22,527

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.

Share:
22,527

Related videos on Youtube

Lacey Etzkorn
Author by

Lacey Etzkorn

Updated on September 18, 2022

Comments

  • Lacey Etzkorn
    Lacey Etzkorn almost 2 years

    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.

    • Admin
      Admin about 12 years
      I think Autohotkey is probably the easiest solution, but I think there might be timing issues with automating a doubleclick and I'm far from an expert with it so I'll leave this for somebody else to answer.
    • Admin
      Admin about 12 years
      Thanks @Shinrai. Apparently AutoHotkey can send a double-click to the OS using the click 2 command. See here.
    • Admin
      Admin about 11 years
      Possible duplicate of superuser.com/questions/169575/…
  • Lacey Etzkorn
    Lacey Etzkorn about 12 years
    Fantastic answer, thanks a lot! It appears the X-Mouse Button Control website is down, but as soon as possible I'll try it out. 3 MB in memory is quite acceptable :)
  • tvdo
    tvdo about 12 years
    It's not down at the moment, but here's an official download mirror as listed on their site: highrez.xtreemhost.com/downloads/XMouseButtonControl.htm
  • avirk
    avirk about 12 years
    Good one through AHK.
  • Lacey Etzkorn
    Lacey Etzkorn about 12 years
    You are right, it's not down, it's Firefox not properly querying DNS. It works fine in Chrome. Our RHEL 6 setup is so messed up and I am a mere plain-user and can't fix it :p . Thanks again
  • Lacey Etzkorn
    Lacey Etzkorn about 12 years
    (I should clarify, the question is for my home computer, which runs Win 7 x64. At work I'm on a RHEL 6 Linux cluster.)