Jump to content
LaunchBox Community Forums

PCSX2 AHK to change button mapping?


jimbone007

Recommended Posts

I'm trying to create a ahk for pcsx2 games like time crisis 2 so I can basically change the ''a'' button on the guncon to a button on my keyboard so I can get past calibration screens. My gun4ir doesn't have buttons. Is this possible? I'm barely understand ahk and was wondering if someone can provide me with a example of what this ahk would be so I can just copy it into my ahk and change file paths to make it work for me. Then I can apply the same to all my games that require me to hit buttons to begin the light gun game.

Link to comment
Share on other sites

No need for ahk to do what you want. You can map the A button to a keyboard key on PCSX2's input settings. If it's just for that game you can create a specific configuration folder for it. To do that, Edit the game on Launchbox and add a custom command-line parameter. It should be something like this:

2022-04-12.thumb.png.aefd76d8ea9ba7b7b083541a26a191f1.png

--fullscreen --cfgpath="Game Configs\Time Crisis II (USA)"

Copy the content of the pcsx2/inis folder to pcsx2\Game Configs\Time Crisis II (USA). Edit the button mappings as you please and that's it.

Edited by Suhrvivor
Link to comment
Share on other sites

50 minutes ago, jimbone007 said:

I cant find the ini file with button mappings. What will it be named and where in pcsx2 folder will it be located? I get what your saying I just cant locate the proper ini

I don't suggest trying to edit it manually. set your mappings in the PCSX2 app and it should get saved to PAD.ini

Link to comment
Share on other sites

I thought if someone on the forum used ahk to launch their ps2 games then they could just show me what I need to type into a ahk and I could remap the a and b buttons to keys on my keyboard and launch the games through the ahk then I could also create a save state bypassing the calibration also but maybe that wouldn't work?

Edited by jimbone007
Link to comment
Share on other sites

Unless I'm wrong in the pcsx2's input implementation you can only bind keys to to buttons that are on the ps2 controller. There is no a or b button on the ps2 controller so I cant input a keyboard key for that button. The a button is on the guncon. The guncon input doesn't allow you to bind keys from the keyboard only the mouse. The gun4ir acts as the mouse and has no buttons other than trigger so I can't assign a or b buttons to anything in pxsc2's button mapping unless there's something I don't know which is very possible since I only started messing around with this a couple days ago. 

Link to comment
Share on other sites

I tried that it doesn't work because It wants a or b with the guncon attached. I'm guessing the emulator is emulating a attached guncon and the guncon had a and b buttons so the emulator is only allowing the guncon to control player one not the keyboard or anything else. They are 2 separate config screens for mapping.

Link to comment
Share on other sites

I plugged in my ps4 controller and configed it with all the buttons. selected no guncon in the usb config. launched the game and it worked fine. The game auto skipped the calibration screen because no guncon was pugged in. The problem is I don't have buttons on my guncon. The emulator will only allow the guncon as controller one when in use which means if you need buttons they must be part of the guncon config. Thats why I was hoping it was possible to use ahk to change the a button on the guncon to the a button on my keyboard for example and use my keyboard along with my guncon as player one. I don't know if that's possible and I barely understand ahk so unless someone else with knowledge of ahk and how it works will tell me if its possible and type it out for me to use I doubt I'll get this to work.

Edited by jimbone007
Link to comment
Share on other sites

10 minutes ago, jimbone007 said:

I plugged in my ps4 controller and configed it with all the buttons. selected no guncon in the usb config. launched the game and it worked fine. The game auto skipped the calibration screen because no guncon was pugged in. The problem is I don't have buttons on my guncon. The emulator will only allow the guncon as controller one when in use which means if you need buttons they must be part of the guncon config. Thats why I was hoping it was possible to use ahk to change the a button on the guncon to the a button on my keyboard for example and use my keyboard along with my guncon as player one. I don't know if that's possible and I barely understand ahk so unless someone else with knowledge of ahk and how it works will tell me if its possible and type it out for me to use I doubt I'll get this to work.

I have Guncon2s for my Gun4IRs so I haven't needed to do this but it sounds like what you want is an AHK to remap some keystroke to the right and middle mouse clicks which in PCSX2 would be what the Nuvee plugin uses for A and B.

Link to comment
Share on other sites

3 minutes ago, Headrush69 said:

I have Guncon2s for my Gun4IRs so I haven't needed to do this but it sounds like what you want is an AHK to remap some keystroke to the right and middle mouse clicks which in PCSX2 would be what the Nuvee plugin uses for A and B.

Exactly

Link to comment
Share on other sites

My gun4irs are tc4 arcade guns and I have rumble motor and original recoils mechanism so there wasn't much room to fit buttons. I planned to originally but once it was together it was to tight to fit. The only other option I'm considering is once I build my cab I can wire a button on my cab to go into my gun and act as a guncon a or b button so I can play ps1 and ps2 games but It'd be way easier to manipulate the software if possible.

Link to comment
Share on other sites

12 hours ago, jimbone007 said:

sounds like what you want is an AHK to remap some keystroke to the right and middle mouse clicks

Quick and dirty example:

Send mouse Right click using "Q" on the keyboard

q::
MouseClick, Right

Send mouse Middle click using "W" on the keyboard

w::
MouseClick, Middle

 

Link to comment
Share on other sites

For anyone else out there trying to figure this out this is how I got it to work. I had to go into usb plugin, guncon 1 config, acquire, and selected no for gamepad as guncon. I clicked using my mouse and then it says something along the lines of device ready. I launched the game then used my mouse to get me through the calibration screen and then hit f1 to create a save state. then I went back into the settings and did the same thing but with the light gun instead of mouse. launched the game again and hit f3 and then skipped the calibration all together. The gun is actually pretty accurate but could be better. I'm going to keep trying to get it where I want it but its playable as is.

Edited by jimbone007
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...