Set mouse or keyboard button to simulate left click and hold or rapid left click repeating in Windows?

Does anyone know a way to configure Windows 7 or use third party software to do this? I would like to click my middle mouse button and have it tell Windows to left click and hold until I click the middle mouse button again. A keyboard key would be fine as well.

Some games and apps have me holding down the left mouse button for a long time and I would like to reduce the stress on my mouse hand. Also, I would like to do a similar thing but have it repeatedly click the left mouse button automatically if possible.

If none of that is possible, how about temporalily setting a keyboard key to achieve a left mouse button emulation?


Solution 1:

you can create all your custom keyboard shortcuts using autohotkey. Autohotkey is a free open source software for macro and key binds.

http://www.autohotkey.com/

Solution 2:

Here's the autohotkey script that will bind a keyboard shortcut (CTRL + g) to a mouse click.

^g::
click

Save this in notepad with the file extension .ahk then compile with autohotkeys. To compile autohotkeys scripts you will need to download it here:

http://www.autohotkey.com/

Also You can replace the key g with any letter to change the trigger key. To change from CTRL to ALT replace the ^ with !. For a complete list of symbols defining hotkeys see this documentation...

https://www.autohotkey.com/docs/Hotkeys.htm

Solution 3:

MouseKeys is built into windows XP and higher.

Step 1 Turn on MouseKeys in Windows XP by pressing “Left-Alt, "Left-Shift" and "NumLock” simultaneously. Press “Enter” to select “Yes” in the dialog box that appears to activate MouseKeys.

Step 2 Move the mouse pointer left and right by pressing “4” and “6” on the numeric keypad. Press “8” and “2” to move the pointer up or down. The “1”, “3”, “7” and “9” keys move the mouse pointer diagonally.

Step 3 Simulate a left mouse click by pressing “5." Press “+” to double-click. Press “-“ and then “5” to right-click.

Step 4 Drag and drop by moving the mouse with the numeric keypad. Press “Insert” to simulate holding down the mouse button, and then press the “Delete” key to release.

Solution 4:

Autohotkey script for mapping a key to left mouse button (and hold while keeping key pressed), if key combined with SHIFT, the right mouse button will be clicked instead of the left. I used the `

`::  ;backtick (tilde) key
click Down left ;click left mousebutton and hold
keywait,`` ; wait until key is released. Double backtick because backtick needs to be escaped (with a backtick)
click Up left ; release left mousebutton
return

^`::  ;backtick (tilde) key
click Down right ;click left mousebutton and hold
keywait, ^` ; wait until key is released. 
click Up right ; release left mousebutton
return