KeyPress Actions not Working in MAME
KeyPress Actions not Working in MAME
I need help figuring out how Eventghost sends keypresses as I'm more then a little lost. I had a script written to press down a key ("5" coin 1) wait release said key, wait and then press another key ("1" Player 1 Start) followed by a wait and a release. This script worked perfectly on a MAMEUI Deluxe 0.156 build but does not work on a 0.166 with Direct Input or my target build GroovyMAME 0.212. One user says it may be due to EventGhost using DirectInput 7 rather then DirectInput 8 which the most recent MAME uses.
Re: KeyPress Actions not Working in MAME
I hate to have done it but I tried Autohotkey out and it works so I'm really at a loss to why EventGhost Key strokes arn't being picked up by MAME. Does anyone know the specifics to how EventGhost sends keypresses in its 2 modes ( default and the alternate method check box) If I knew how it was trying to send the key presses it would be much easier to solve. I am leaning towards the thought that even eventghost 0.5 is using an old version of DirectInput
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: KeyPress Actions not Working in MAME
sending keystrokes requires the Find Window Action to be placed before it. It needs to know what window to send the keystrokes to.
Re: KeyPress Actions not Working in MAME
What no it doesn't, I don't know why you would think that. My script always just freely entered keystrokes. For instance if I have my script running in EventGhost and i open Notepad a joystick button when pressed will produce a 5 followed by a 1 every time. I can then switch to firefox, explorer, any text field in any program and it will do the same. Even in a old version of MAME I use to us i can get them to work its only in builds of MAME post 2015 that EventGhost doesnt seem to work with at all. After a lot of searching I'm pretty sure some part of the keystroke emulation is out of date or bugged as I am 99% sure I have narrowed it down to an EventGhost issue but without knowing how EventGhost is actually sending keystrokes I can't know for sure or offer a Fix to the Devs of either project.kgschlosser wrote: ↑Wed Aug 14, 2019 4:49 pmsending keystrokes requires the Find Window Action to be placed before it. It needs to know what window to send the keystrokes to.
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: KeyPress Actions not Working in MAME
give this a try...
add a python command action before your Send Keys action.
In the python command action key in
click on the OK button...
now give it a shot.
add a python command action before your Send Keys action.
In the python command action key in
Code: Select all
del eg.lastFoundWindows[:]
now give it a shot.