Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: delt31 on April 18, 2015, 10:39:44 pm

Title: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: delt31 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?
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: BadMouth 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.
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: stigzler 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
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: delt31 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?
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: delt31 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?
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: stigzler 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?
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: BadMouth 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.
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: delt31 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?
Title: Re: Anyone have an AutoHotKey script to change keys for NullDC?
Post by: stigzler on April 22, 2015, 02:37:29 am
Do try the ahk forums. Itd be a 2 minute job for someone proficient in it.