Jump to content
Sign in to follow this  

Mouseclick + Keys combination to send a MMB click ?

Recommended Posts

I'm working with Autodesk Maya and as a 3d animator, I need to work with a tablet. Because of some recent thumb injuries, I cannot (and should never ever) use the buttons on my pen as MMB and RMB! : 
A 3 buttons mouses is a must have in Maya. So, I need to find a way to simulate a MMB and a RMB click with a keyboard key while clicking the LMB.
>_< What I'm trying to achieve (US layout):
When ["WIN" + LMB]       is down, Send [MMB] click down.
When ["WIN" + "" + LMB] is down, Send [RMB] click down.
When ["CTRL" + "WIN"]    is down, Send ["WIN"] click down.
(And of course, blocking the character input if possible, while down)
Pretty sure I'm doing the wrong way but here is my code so far...
(Witch, of course, doesn't work.)
#include <Misc.au3>
#include <MsgBoxConstants.au3>

Local $hDLL = DllOpen("user32.dll")

While 1
    ; WIN + LMB simulate MMB (5B = WIN key)
    If _IsPressed("5B", $hDLL) And _IsPressed("01", $hDLL) Then
        ConsoleWrite("_IsPressed - Z + LMB" & @CRLF) ; test

        ; Keys and Click DOWN...
        While _IsPressed("5B", $hDLL) And _IsPressed("01", $hDLL)
            ; Disable default windows key function ???

            ; Simulate..
            ConsoleWrite("MMB down" & @CRLF) ; test
        ; Keys and Click UP...
        ConsoleWrite("MMB up" & @CRLF) ; test

    ; Exit the script
    ElseIf _IsPressed("1B", $hDLL) Then


Thx in advanced for your ideas and advices. :sweating:

William Popfish

Share this post

Link to post
Share on other sites

you need a foot mouse.

This would completely solve your issue and keep your keyboard setup intact.


with some simple ingenuity I bet you could rig a regular mouse to be on the floor (you have two mice hooked to your PC) and the one on the floor could only have the 3rd button click-able. You simply physically disable the other two buttons and disable the tracking on it.


Share this post

Link to post
Share on other sites

It might actually be a good idea. I'll have a look arround.

Thx for the tip MBalzeshari!

But, I still believe that a simple solution should exist on keyboard. maybe with additional buttons on the left.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...