ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Middle click without using scrollwheel button

<< < (3/3)

rjbull:
And I really don't want to run a super-duper-multi-purpose tool to do this, as I have a slow CPU and very little RAM on this pc.

By the way, I couldn't reach that site with the link you provided, but this one did work: http://powerpro.webeddie.com/
-app103 (July 02, 2008, 04:21 AM)
--- End quote ---

Glad you found Ctrl-LeftClick worked!

The link is working now...  PowerPro is a relatively resource-light application especially for all it does, but it rather becomes a way of life.  You could try some of the other macro programs instead, of course.  At least some of them should work on Win9x.  E.g. Macro Maker, which is dated 2003.

rjbull:
In fact, I've just this minute realised that the scrollwheel doubles as the apparently missing middle mouse button...-rjbull (July 02, 2008, 04:05 AM)
--- End quote ---

@rjbull: if you had stayed "un-realised" then you'd endeared yourself to many in this thread. ;D
-lanux128 (July 02, 2008, 06:25 AM)
--- End quote ---

I never said I like it that way!   :D

cheesemoo:
For anyone interested, I threw some AHK code together that lets you click your left & right buttons at the same time to get a middle click. This code avoids the problems caused by using the following simple AHK script that sends a middle click whenever the two buttons are held down at once:

~LButton & RButton::MouseClick, Middle
~RButton & LButton::MouseClick, Middle

For example, using my code, you can still hold down the left button and click the right one to jump forward one page in Opera (or whatever). It also keeps the middle mouse button held in until you release one of the two buttons, so for some program that uses middle-click dragging, you should also be able to use this (though I haven't tested that, I don't think I have any program that makes use of a middle-drag).

There are some additional hotkeys included: windows+m toggles the middle-click behavior on and off (if some program refuses to work with it on, this will return your mouse to normal functionality and let you switch back when done). F11 quits the script altogether, and F12 reloads the script from the HD. You'll probably want to leave those last two out at least since they were just for debugging.

You can also adjust how fast you have to be in hitting both at once. The default value which worked well for me was 20ms. Lower values will make it harder to trigger a middle click, but higher values will add more delay to your clicking. That is, if you are just trying to do a left click for example, the program will wait 20ms to see if you're also going to click the right button. After that time has passed without a right click, it will send the left click that you wanted.

I'm not sure that there's any way around adding a delay to make this work, since the program must have some wiggle room for you to click both buttons, but cannot send a click until it knows what you wanted to send. It's not like it can send a left click, then when your right click comes in 10ms later, cancel the left click and send a middle click.

Anyway, a 20ms delay is unnoticeable for me when I'm using my laptop's trackpad, and well worth being able to both have a middle-click and do proper forward/backward gestures in Opera.

Give this a try, let me know what you guys think. I'm sure it could have been coded more elegantly - I threw this together when it seemed that nothing else would do what I wanted to do, and this is the first version that I was happy with.

Edit: to give credit where it is due, this code started out as a copy-paste of one of the AHK example code snippets for the SetTimer function. I also used jgpaiva's code above as a starting point on how to use AHK's mouse functions.

app103:
Well, since it still involves the same mouse related stuff that isn't supported on 9x and I'll be on this 9x machine for only about 2 more weeks, I'll pass on testing it.

One thing I would like to mention about your choice of hotkey to toggle on/off...Windows+M is used to minimize all windows, by default.

Navigation

[0] Message Index

[*] Previous page

Go to full version