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: HELP: MAME ignores AutoHotKey mappings  (Read 3989 times)

0 Members and 1 Guest are viewing this topic.

DrChek

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 231
  • Last login:July 25, 2025, 08:25:09 pm
HELP: MAME ignores AutoHotKey mappings
« 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.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: HELP: MAME ignores AutoHotKey mappings
« Reply #1 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.