14

I have a mouse with only two buttons but I still need to use the middle mouse click for some programs. Is there a way to emulate the middle mouse click (e.g. by adding a keyboard shortcurt) in Windows 7?

8 Answers 8

4

If you are at all familiar with AutoIt or Autohotkey you could map any button you like to function as the middle mouse button. If you're not familiar with them, it will take less than 10 minutes to download, install and learn the syntax required to do this.

1

Did you try Shift+Leftclick or something similar? Some laptops use that combination to simulate middle button. Or click both buttons.

1
1

Use the free tool NeatMouse. It allows you to emulate any mouse-button via a configurable key.

0
1

I have a Toshiba Kirabook with Windows 8.1 and similarly no middle mouse button and one of my programs requires a middle mouse click for some functions. I was experimenting with different key strike combinations and found that if I hold down the "Fn" key between the "ctrl" and "windows/ startmenu" key and left-click, then it makes a middle mouse click in any program. Hope this helps Kirabook users.

Regards, Christopher Collins

0

Try pressing both the left and right mouse buttons at the same time. If it doesn't work, take a look at this: http://cybernetnews.com/helpful-tip-middle-click-on-a-touchpad-laptop-mouse/.

Try searching the site next time, there is already an answer: How can I emulate middle click in Windows on a touchpad?

1
  • 1
    This answer doesn't help. The news link that you provided only works on specific drivers. The second link, about searching the site doesn't answer this question either.
    – Mugen
    Feb 26, 2018 at 8:02
0

To fill out dmux's answer, this is an AutoHotkey script I use:

*RButton::
SetMouseDelay -1
if (not GetKeyState("LButton")) {
    SendEvent {Blind}{RButton down}
    KeyWait RButton
    SendEvent {Blind}{RButton up}
    return
}
KeyWait RButton
KeyWait LButton
SendEvent {Blind}{MButton}
return

/* this adds a hotkey for Ctrl+Alt+x to quit the script (in case there's an
 * error in the script), but this combination is removed when the script is
 * compiled:
 * https://www.autohotkey.com/docs/misc/Ahk2ExeDirectives.htm#IgnoreKeep
 */
;@Ahk2Exe-IgnoreBegin
^!x::ExitApp
;@Ahk2Exe-IgnoreEnd

This allows clicking and dragging with the left and right mouse buttons to function as normal, but when the left mouse button is pressed and held while the right button is pressed, when both are released the middle mouse button is pressed.

The limitations of this approach:

  • The left mouse button press is still sent
  • Clicking and dragging with the right mouse button is not possible
  • Clicking and dragging with the middle mouse button is not possible
  • The order cannot be reversed (i.e. if the right mouse button is pressed first, followed by the left button while the right button is still being held, when the buttons are released, both presses will be sent instead of a middle click)

A different approach is:

F11 & F12::
SetMouseDelay -1
SendEvent {Blind}{MButton down}
KeyWait F12
SendEvent {Blind}{MButton up}
KeyWait F11
return

F12 & F11::
SetMouseDelay -1
SendEvent {Blind}{MButton down}
KeyWait F11
SendEvent {Blind}{MButton up}
KeyWait F12
return

F11::F11
F12::F12

/* this adds a hotkey for Ctrl+Alt+x to quit the script (in case there's an
 * error in the script), but this combination is removed when the script is
 * compiled:
 * https://www.autohotkey.com/docs/misc/Ahk2ExeDirectives.htm#IgnoreKeep
 */
;@Ahk2Exe-IgnoreBegin
^!x::ExitApp
;@Ahk2Exe-IgnoreEnd

With this, pressing both F11 and F12, in any order, presses the middle mouse button down, and then releasing the key that was pressed most recently releases the middle mouse button.

For example:

  1. Press and hold F12
  2. Press and hold F11: The middle mouse button is pressed down
  3. Release F11: The middle mouse button is released
  4. Release F12

This approach removes the limitations of the previous approach, but adds one limitation:

  • Modifier keys (e.g. Shift, Alt, etc) cannot be used during the middle button click

Any other solutions or suggestions are welcome.

0

I put together this AutoHotKey (version 2+) script to make it easier to do "middle-click & drag".

The "left" and "right" mouse clicks still both get sent to the application like normal -- this script only "injects" some extra "middle mouse button" events. Basically, once both left + right mouse buttons are down, a "middle mouse down" is triggered (and raises a flag). Later, if the "flag" is up and the user lets go of either left or right mouse buttons, then a "middle mouse up" is triggered (and the flag is lowered).

#Requires AutoHotkey v2.0

_mockDown := 0
while(1){
    _bothDown := GetKeyState("LButton", "P") + GetKeyState("RButton", "P")
    if(_bothDown == 2 && _mockDown == 0){
        Send "{Blind}{MButton down}"
        _mockDown := 1
    }
    if(_bothDown != 2 && _mockDown == 1)
    {
        Send "{Blind}{MButton up}"
        _mockDown := 0
    }
    Sleep 25
}
0

The settings for the touch pad may offer settings.

In the case here the behaviour of left and right button can be changed to middle click ("Klicken mit der mittleren Taste"). This might be a temporary alternative.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .