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: Anyone have an AutoHotKey script to change keys for NullDC?  (Read 4192 times)

0 Members and 1 Guest are viewing this topic.

delt31

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:August 01, 2020, 03:11:10 pm
  • I want to build my own arcade controls!
Anyone have an AutoHotKey script to change keys for NullDC?
« on: April 18, 2015, 10:39:44 pm »
My xarcade is assigned alt, ctrl, etc which are already hotkeys for nulldc.  Does anyone have a AHK I can use to reassign those buttons to ones that will be recognized?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #1 on: April 20, 2015, 09:46:46 am »
No but autohotkey can't block keys in any version of windows newer than XP.
So if using Vista or newer, those keys would still be registering in addition to the ones you changed them to.

When I had an x-arcade, I set up an alternative mapping to avoid things like this.
If you have an older one, you have to press the button on the back twice to load the alternative settings which sucks, but at least you can change the keys.
The new ones don't require you to do this.

This is why I never use the first four default MAME keys.
It just leads to problems with other games and emulators.

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #2 on: April 20, 2015, 03:30:33 pm »
Would it not be something like the below? This method worked for me with different keys - just adapted for this scenario - not tested:

Code: [Select]
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

;>>   ------------------------------------------ NULLDC ---------------------------------------------------
SendMode Event

;------------------------Alt to A----------------------------
$!::
Send A
KeyWait, !
return

;------------------------A to Alt----------------------------
$a::
Send {Alt down}  ; Press down the alt key.
Send {Alt up} ; Release alt key
KeyWait, a
return
« Last Edit: April 20, 2015, 04:15:55 pm by stigzler »

delt31

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:August 01, 2020, 03:11:10 pm
  • I want to build my own arcade controls!
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #3 on: April 20, 2015, 11:12:57 pm »
I tried the script and it didn't work.  Put in in the NULL DC folder, complied it and ran it assigned one of the buttons as alt and it didn't recognize it as A or at all in game.  Did I do something wrong?  Maybe wrong location?

delt31

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:August 01, 2020, 03:11:10 pm
  • I want to build my own arcade controls!
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #4 on: April 20, 2015, 11:14:37 pm »
No but autohotkey can't block keys in any version of windows newer than XP.
So if using Vista or newer, those keys would still be registering in addition to the ones you changed them to.

When I had an x-arcade, I set up an alternative mapping to avoid things like this.
If you have an older one, you have to press the button on the back twice to load the alternative settings which sucks, but at least you can change the keys.
The new ones don't require you to do this.

This is why I never use the first four default MAME keys.
It just leads to problems with other games and emulators.

what do you mean alternative?  I have a new one and would like to avoid reprogramming the tankstick as it works fine with everything else and configured as such.  I don't mind pressing the button but is that alternative mapping already on it and which button?

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #5 on: April 21, 2015, 02:38:36 am »
The script was untested and really just illustrative of concept. Youll have to adjust it. Maybe try the ahk forums?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #6 on: April 21, 2015, 11:06:25 am »
No but autohotkey can't block keys in any version of windows newer than XP.
So if using Vista or newer, those keys would still be registering in addition to the ones you changed them to.

When I had an x-arcade, I set up an alternative mapping to avoid things like this.
If you have an older one, you have to press the button on the back twice to load the alternative settings which sucks, but at least you can change the keys.
The new ones don't require you to do this.

This is why I never use the first four default MAME keys.
It just leads to problems with other games and emulators.

what do you mean alternative?  I have a new one and would like to avoid reprogramming the tankstick as it works fine with everything else and configured as such.  I don't mind pressing the button but is that alternative mapping already on it and which button?

I mean reprogramming it. 

The old ones had a switch on the back with 4 different positions for the default and 3 other mappings.
You'd have to move the switch to the alternative mapping, then press a button twice to load it.
In my case, I left it in that position all the time and had to press the button twice every time I turned on the computer....which gets old.

The new ones are supposed to have done away with having to press the button to load alternative settings.
I do not know if they still have the switch on the back as I've never seen a newer one.

delt31

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:August 01, 2020, 03:11:10 pm
  • I want to build my own arcade controls!
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #7 on: April 21, 2015, 07:31:37 pm »
OK thanks. Crazy that the only solution is that.  Heard others mention that joy mapping program but it didn't work either even though it works well with mkx.  Maybe I'm using the won't plug in for null?

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 983
  • Last login:March 21, 2025, 06:36:05 am
  • It seemed like a good idea at the time....
    • Mago Arcade
Re: Anyone have an AutoHotKey script to change keys for NullDC?
« Reply #8 on: April 22, 2015, 02:37:29 am »
Do try the ahk forums. Itd be a 2 minute job for someone proficient in it.