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: Minor AutoHotkey Issue with MAME  (Read 2129 times)

0 Members and 1 Guest are viewing this topic.

wild_eyed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:September 09, 2020, 06:05:39 am
  • I want to build my own arcade controls!
Minor AutoHotkey Issue with MAME
« on: August 14, 2011, 05:45:37 pm »
hi all, i hope someone here can help me.
im using an Xarcade control Panel

the button on the far right is assigned to the Kepboard number 4

im using it as my "shift" key

Using Auto Hot Key i want

4 & 1::Send {p}
4 & 2::Send {Esc}
4 & q::Send {Return}

i have compiled my ahk script and it works fine when tested in notepad.

but when mame is running my new commands dont do anything...
any ideas?

do i need to tell the script to watch the mame window or something?

any help would be greatly appreciated.

paul

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 11:01:57 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Minor AutoHotkey Issue with MAME
« Reply #1 on: August 14, 2011, 09:38:22 pm »
Mame uses raw keyboard data so ahk scripts that do simulated keypreses won't work on it, sorry. 

But it looks like what you are trying to do is have two keys combined do a special function.  (Pause, exit and enter?) 

Simply remap your keys in mame.  It supports "and" so you can have ui exit mapped to "1 and 4" instead of just "esc"

Check the mame faq if you have trouble mapping two keys together as an "and".