Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Is it possible to have 2 keys set to do the same thing in GameEx eg. I'd like to have the Up Arrow and the R key assigned to 'up' in GameEx and the Down Arrow and F assigned to 'down' so that either player at my arcade cabinet can select a game? I've tried seperating the numbers in custominput.ini with a , or ; but it hasn't worked

Thanks

Stu

Posted

This has been in the feature requests for a while. As of right now, I don't think there is any way to do this. I had some spotty results using AutoHotKey, but was not impressed enough to keep it on my cab (but then again, I don't really know how to code in AHK).

Posted
This has been in the feature requests for a while. As of right now, I don't think there is any way to do this. I had some spotty results using AutoHotKey, but was not impressed enough to keep it on my cab (but then again, I don't really know how to code in AHK).

I was thinking I'd have to go down the AHK route but I was hoping there might be a nice clean simple way of doing it... some day I've go a bit of spare time I'll maybe give it a go

Posted

If you come up with a solution that works well enough, please share with the community! I know I have seen half a dozen or so requests for this feature, but it isn't currently possible in GameEx natively. I would REALLY like to be able to do this, but my efforts failed.

Posted

I got round to looking at this again today and I've got it working really well using AHK from what I can see, I've gave it a good test and I can't see any issues so far, it was acutally alot easier than I thought, here's how:

create an ahk and at the top have this line


#IfWinActive, GameEx

;this tells ahk to only remap controls when the active window starts with GameEx in the title

;then just list the controls you want to change, so for me thats

;select and back
6::5
2::1

;make player 2 joystick the same as player 1
r::UP
f::DOWN
d::LEFT
g::RIGHT

;make player 2 buttons the same as player 1
a::v
s::b
q::n
w::c
i::z
k::x

save the file and compile it to an exe and have GameEx launch the exe before it starts and then kill the exe when it exits using process.exe -k

I already have GameEx set to launch a batch file before and after it launches to close and open a few programs I keep running in the background of my cab so it was just a matter of adding a couple of lines to the batch file

** If you don't compile the ahk to an exe then it will still work but if like me you have other emulators and games that start and close various ahks then you'll close your GameEx ahk too so player 2's controls would work to start with but may stop working after running certain programs

hope this helps someone

Posted

Hmmm, I may have to give this a try again. My problem is that I was trying to map joystick buttons to other joystick buttons. It didn't work the way I was doing it, but perhaps this will work...

Posted

Great work there, PimpDaddyStu! It really wasn't that hard to do after all.

Edit: I've tried this now, and the buttons work fine, but I can't seem to get my controls to work for some reason. Wait, I just thought of something... Perhaps I'll get it to work. ;)

Emph

Posted
Great work there, PimpDaddyStu! It really wasn't that hard to do after all.

Edit: I've tried this now, and the buttons work fine, but I can't seem to get my controls to work for some reason. Wait, I just thought of something... Perhaps I'll get it to work. ;)

Emph

did you get it working Emph?

I've added another wee line to my code which instantly moves the mouse off screen so you don't see it when changing emu's or anything

DllCall("SetCursorPos", int, 10000, int, 10000)

Posted

Unfortunately, I didn't get it to work. I use the X-Arcade dual. I think that's the problem. I'm gonna build a new panel when I have some more time. Perhaps this summer.

Buttons work, but not navigation. It's really strange though, since it's only keypresses. Does AutoHotKey use different key-codes for "8" and "numpad 8"? If that's the case, perhaps I can figure it out.

Thanks.

Emph

Posted
Unfortunately, I didn't get it to work. I use the X-Arcade dual. I think that's the problem. I'm gonna build a new panel when I have some more time. Perhaps this summer.

Buttons work, but not navigation. It's really strange though, since it's only keypresses. Does AutoHotKey use different key-codes for "8" and "numpad 8"? If that's the case, perhaps I can figure it out.

Thanks.

Emph

Yeah there's Numpad0 through to Numpad9 though there's also NumpadUp NumpadDown and so forth which are seperate from the numbers

You could also try the sendinput command rather than just send

  • 4 weeks later...
Posted

I just wanted to point out that my original plan to use AHK to remap joystick buttons is impossible. AHK can read joystick input, but cannot set joystick info. As a result, I plan on checking the input from the joystick and sending the keys that the keyboard input would be using. I've tried this in the past, but it hasn't worked. Since I've been using AHK a little bit lately, I've found it's actually pretty simple so I'll probably get to this over the weekend. If I'm sucessfull, I'll upload the script here.

Posted

What sort of joysticks are you using bkenobi? are they not connected to a keyboard encoder?

Stu

Posted

I have a GP-Wiz32 which is a gamepad encoder. Basically a 32 button gamepad. udlr + buttons 1-7 are player1 and buttons 8-18 are player 2 (the rest are coin, start, pause, quit). I need to either map 8-18 (well, I don't need all of them, but most) to p1 joystick buttons or to the equivalent keyboard buttons that GameEx is looking for. For whatever reason JoyToKey outputs aren't received correctly to work and none of the AHK scripts I have written or stolen and modified work. Nologic suggested XPadder, but I haven't gotten to it yet. Any ideas?

Posted

I was about to suggest Xpadder there myself... it's my new favourite program for mapping gamepads :)

Have you tried the different send methods that AHK has? there are:

Send

SendInput

SendPlay

SendEvent

The other thing I'm just thinking is, do you have the Enable Gamepad/Joystick set to YES in the input settings?

If you do then I'd try setting it to DON'T and then try AHK again, I'm thinking GameEx might be picking up the gamepad control and deciding to do nothing where as if its not expecting the gamepad commands it might notice the keys that AHK is sending instead... just a thought though and I'm not at my cabinet to test :)

Stu

Posted

What do you mean "JoyToKey outputs arn't received correctly"? I believe you have to set the joystick mode to 8-way otherwise it won't work.

Posted

I use JoyToKey for emulators such as ZSNES that don't like having more than 16 buttons. I haven't figured out how to switch profiles, so I have a single profile that works for all emulators and should work with GameEx as well. The problem is that it doesn't work well. I don't recall at the moment whether it worked at all, or if it only worked with single presses. I had one configuration that worked so that you could navigate, but you had to press "down, down, down, down" to scroll down 4 items instead of just holding the joystick down. Unfortunately, I've tried so many things now that I can't remember how I had that working.

I'll try just sending keyboard inputs to gameEx as PimpDaddyStu suggested. Perhaps JoyToKey or XPadder will work in that configuration.

Posted

I just tested my theory and using xpadder and setting gameex to not use joypads and I'm still able to control gameex with the joypad and if I hold down on the pad it scrolls down through the list without any trouble, if I set gameex to use joypads then it works too but the controls are different from what I set xpadder to send so gameex must be ignoring it... I would assume the same should be the same for AHK or Joy2Key

So with a bit more perseverance bkenobi you should be living in 2player controlled gameex bliss :)

Stu

Posted

Just so I understand what you did: You disabled joystick inputs in GameEx and used XPadder to map player2 buttons to keyboard inputs? You also left P1 controls alone so that GameEx detected the joystick inputs there, right?

Posted

Never mind, I got it! Thanks for the help.

So if anyone else reads this, here's what I did. I created a XPadder profile that sets P1 and P2 buttons to be the same thing. Then I made sure that "Initialize Joystick" was disabled in GameEx. You could use the default keys, but I happened to use a custom key layout (just what I had been playing with prior to get it working), so either will work.

Posted

I have one question left. I set up my controls so that buttons 1-4 are ASDF. When I use buttons A, S, and F, they perform as desired. When I use button D, the list goes to item D. D is supposed to be set up as volume, but it doesn't do that. Any ideas what I should look at? I checked the custominput.ini file already, and it's correct.

EDIT: Okay, so if I use D and hit up or down, the volume does change. But, I don't want to go to "D" in the list. So, I guess I'll have to pick a non-letter for that button. No biggie.

Guest
This topic is now closed to further replies.
×
×
  • Create New...