Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mapping a keyboard button to MouseClick  (Read 2170 times)

0 Members and 1 Guest are viewing this topic.

FritzStudio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:August 23, 2008, 12:42:12 am
Mapping a keyboard button to MouseClick
« 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

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mapping a keyboard button to MouseClick
« Reply #1 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
« Last Edit: March 03, 2008, 08:39:04 pm by protokatie »
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

FritzStudio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:August 23, 2008, 12:42:12 am
Re: Mapping a keyboard button to MouseClick
« Reply #2 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 :)

protokatie

  • I DO try to be insulting and horrible to my fellow Terran
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1396
  • Last login:March 27, 2012, 09:36:43 pm
  • Is anyone here a member of team retard?
Re: Mapping a keyboard button to MouseClick
« Reply #3 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...
--- Yes I AM doing this on purpose, and yes I DO realize it is pissing you off.

---If my computers were cats, my place would look like an old widows house, with half of the cats having obvious health problems

Fozzy The Bear

  • Handbags at dawn in here!!!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1831
  • Last login:September 18, 2011, 11:29:59 am
  • It's Been One Of Those Days... Don't Ask!
Re: Mapping a keyboard button to MouseClick
« Reply #4 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)
Most bottles and jars contain at least twenty-five percent recycled Pacman.
And research indicates that Space Invaders are strongly attracted to people who have recently eaten meat pies.

FritzStudio

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:August 23, 2008, 12:42:12 am
Re: Mapping a keyboard button to MouseClick
« Reply #5 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

Fozzy The Bear

  • Handbags at dawn in here!!!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1831
  • Last login:September 18, 2011, 11:29:59 am
  • It's Been One Of Those Days... Don't Ask!
Re: Mapping a keyboard button to MouseClick
« Reply #6 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)
Most bottles and jars contain at least twenty-five percent recycled Pacman.
And research indicates that Space Invaders are strongly attracted to people who have recently eaten meat pies.

Darq

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:May 01, 2012, 10:30:55 pm
  • Darq Control
Re: Mapping a keyboard button to MouseClick
« Reply #7 on: April 13, 2008, 09:20:42 pm »
I'd like to see thos epics if you have time.

um3k

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 74
  • Last login:August 25, 2025, 09:09:18 am
Re: Mapping a keyboard button to MouseClick
« Reply #8 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!