Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: FritzStudio on March 03, 2008, 06:24:41 pm

Title: Mapping a keyboard button to MouseClick
Post by: FritzStudio on March 03, 2008, 06:24:41 pm
Hi all,

I am using an X-arcade stick, along with the GroovyGameGear trackball in my Mame cab, but i currently cant figure out how to map one of my buttons to be a mouseclick.  the trackball works fantastic as a mouse, just need the mouseclick?

Can a keyboard button (the Xarcade buttons) be remapped to be a mouseclick? Should i jam a small mouse under one of the buttons>?

I looked into the AutoHotKey script and the mouse tracking functions in there, seemed a bit more than i need, but i dont know..

thanks so much for any help/solutions you guys have worked out
mikeo
Title: Re: Mapping a keyboard button to MouseClick
Post by: protokatie on March 03, 2008, 08:31:11 pm
Quote
I looked into the AutoHotKey script and the mouse tracking functions in there, seemed a bit more than i need, but i dont know..


A 2 line autohotkey script would cover both buttons, the caveat in autohotkey is that doubleclick is a different thing than single clicking twice... Should still get you by until you find a better solution tho.


EDIT: Here is an autohotkey script I made for moving the mouse and handling the buttons, prolly not very useful for you, but it may get you somehere.

^up::Mousemove,0,-5,0,R
^down::Mousemove,0,5,0,R
^left::mousemove,-5,0,0,R
^right::mousemove,5,0,0,R
^q::mouseclick,left
^w::mouseclick,left,,,2
^e::mouseclick,right

note the mouseclick,left,,,2 is the double click
Title: Re: Mapping a keyboard button to MouseClick
Post by: FritzStudio on March 04, 2008, 02:14:31 am
thanks for your reply.

so it seems i can use AutoHotKey to do what i want then, I just need a simple mouse click to launch games in my FE and such.

i was confused as it seemed like the mouseclick needed to know where it was clicking on the screen, thus polling for X Y data..

can i just have Mouseclick, like you have in this example script, and it will know what i'm hovering over??

sorry for the noobness, i swear i do nice woodworking/electrical to make up for it :)
Title: Re: Mapping a keyboard button to MouseClick
Post by: protokatie on March 04, 2008, 02:59:45 am
Quote
i was confused as it seemed like the mouseclick needed to know where it was clicking on the screen, thus polling for X Y data..

Just omit the x,y stuff and it will do a mouse-click where the mouse is. (EG the multiple commas in the double click line in the script)

There is still the problem that you must hold down a modifier key tho (EG, alt, ctrl, shift etc et al) This is why I said it could work for you, but someone might have a better solution. If this is only to help you control the mouse to deal with occasional OS stuff it should be fine, but it isnt good for day to day mouse stuff... I dont know what keyboard controller you are using, but most have a default that let you somehow hold down a modifer...
Title: Re: Mapping a keyboard button to MouseClick
Post by: Fozzy The Bear on March 04, 2008, 03:55:14 am
I am using an X-arcade stick, along with the GroovyGameGear trackball in my Mame cab

You're using a Groovy Game Gear Trackball..... That's actually a Betson trackball. They have a mouse button inteface built into them. Open it up you'll find the connections for the mouse buttons.

Best Regards,
Julian (Fozzy The Bear)
Title: Re: Mapping a keyboard button to MouseClick
Post by: FritzStudio on March 04, 2008, 11:19:11 am
now we're talking!!!

Thanks for the feedback,  I had a feeling that trackball had more up its sleeve

mike
Title: Re: Mapping a keyboard button to MouseClick
Post by: Fozzy The Bear on March 04, 2008, 12:11:55 pm
now we're talking!!!
Thanks for the feedback,  I had a feeling that trackball had more up its sleeve

No problem Mike.... If you get stuck with it, I can open mine up and do some photographs of the connections for you.

Best Regards,
Julian (Fozzy The Bear)
Title: Re: Mapping a keyboard button to MouseClick
Post by: Darq on April 13, 2008, 09:20:42 pm
I'd like to see thos epics if you have time.
Title: Re: Mapping a keyboard button to MouseClick
Post by: um3k on April 14, 2008, 06:26:07 am
You're using a Groovy Game Gear Trackball..... That's actually a Betson trackball. They have a mouse button inteface built into them. Open it up you'll find the connections for the mouse buttons.
My GGG trackball has a Pico-Wiz board attached directly to the bottom which handles the USB connection and also has a 4 Pin header for mouse buttons (L, M, R, and ground).  No need to even open it up!