Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: DrChek on June 23, 2011, 01:18:47 pm

Title: HELP: MAME ignores AutoHotKey mappings
Post by: DrChek on June 23, 2011, 01:18:47 pm
Doing some testing for using AHK with MAME and I can't get MAME to respond to any hotkeys! I stripped a script down to the simplest possible:

Code: [Select]
6::Send,1
This works in notepad, pressing "6" gives a "1", but in MAME I can load up a game, press "5" for a coin and if I press "6" to start nothing happens. If I press the "1" key it will start, but the alias key "6" never works.
Title: Re: HELP: MAME ignores AutoHotKey mappings
Post by: headkaze on June 23, 2011, 04:21:29 pm
You cannot inject keys into MAME because it uses Raw Input to read the keyboard.

You can compile Mame to use the DirectInput API by modifying src\osd\windows\input.c following line:

Code: [Select]
// For testing purposes: force DirectInput
#define FORCE_DIRECTINPUT       1

Then you should be able to send keys again. This "hack" may not work anymore though.