Jump to content
(Public Beta) HyperSpin 2 is now available for everyone ×

Mapping the X360 Guide Button - Executable + Source Code


Recommended Posts

Posted

Hey guys, someone on Reddit posted an application and source code that will allow us to map the Xbox 360 controller guide button - which isn't normally mapable - to any keyboard key you'd like. Supports four controllers each being mapped to the same or different keys.

http://www.reddit.com/r/emulation/comments/1goval/any_way_to_map_the_middle_xbox_360_button/camujj7

I'm sure this will come in handy, let us know how you decide to use it. Might give others some good ideas.

Link to V5/latest source/binary: https://app.box.com/s/uq22nvhuzjp8yvbtjy3c

button_on_360_guide_source.zip

button_on_360_guide_v2.zip

  • Replies 92
  • Created
  • Last Reply
Posted

Oh scratch that question. I'm having trouble figuring out how to change the what key the button sends. I followed the directions but they're not very good.

778883.png

Emumovieslifetimemember.gif

Posted

In the ini file? I tried changing the number but it still maps to escape lol. Also the link I hope my post above didn't sound rude I apologize if it did. Also the link given in the ini to the key numbers leads to a "page not found" page. do you have a link with the correct codes? Maybe I'm using the wrong key codes or something. I'm trying to map my guide button to the plus key on the number lock side.

778883.png

Emumovieslifetimemember.gif

Posted

The link is correct and works. All the keycodes are there. A quick typing into the ini file and it's done. Run the program, everything works.

Posted
The link is correct and works. All the keycodes are there. A quick typing into the ini file and it's done. Run the program, everything works.

The ini file combines the actual configuration variables with the link into a single "word." You have to separate out everything if you want the link (and the program) to work.

http://cherrytree.at/misc/vk.htm

Or if you just want something to translate them for you: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

Posted

Thanks zero and thanks bwmathis for the correct link. I'll give this a try now :)

8Edit* I must be doing something I wrong I put in 106 which is the one I want and it still maps to escape LOL

[config]

106 Change these to any decimal vkey codes you like.

; Default is 106 (escape).

; There is a list at http://cherrytree.at/misc/vk.htm

key_player1=106key_player2=106key_player3=27

key_player4=27

778883.png

Emumovieslifetimemember.gif

Posted

Those should all be on different lines. Also, why is there a 106 before the commented lines?! All you needed to do was edit the text file, it's simple.

Try this:

[config]

; Change these to any decimal vkey codes you like.

; Default is 27 (escape).

; There is a list at http://cherrytree.at/misc/vk.htm

key_player1=106

key_player2=106

key_player3=106

key_player4=106

Posted

This works awesome, however HS loses focus whenever I exit an emulator with the home button because the battery status window shows up.

Any way around this?

I am......Machine

Posted

Thanks zero! That did do the trick. I'm using it for HP as well! Though when going into HP and hitting the button again to back to the game I just get a white screen lol. It doesn't do this when hitting the button the keyboard to go back and forth between the game and HP.

778883.png

Emumovieslifetimemember.gif

  • 2 weeks later...
Posted
This works awesome, however HS loses focus whenever I exit an emulator with the home button because the battery status window shows up.

Any way around this?

On a previous PC setup I had installed the wireless controllers with the software which has your battery indicator appear on the screen when you press the guide button. I believe it's called the Xbox360 Accessories Software. This would actually cause some emulators to crash (because the application would launch when the emulator was running in full screen). I never did find or look for a solution but on my new PC (running Win7 64-bit) I simply plugged in the wireless adapter and Windows auto-detected the driver without installing that software. So I'd have to assume you can uninstall that battery indicator software somehow. In your Control Panel-->Uninstall a Program, it should be there called Microsoft Xbox 360 Accessories. Perhaps you can uninstall it without losing the driver?

If you need to reinstall it, you can find it here:

http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows

Posted

Wirless 360 Controller battery indicator is located at: C:\Program Files\Microsoft Xbox 360 Accessories\XBoxStat.exe. I opened the taskmanager and did End Process on XBoxStat.exe and now the indicator will not show when the Xbox button is pressed. To turn it back on I simply created a shortuct to the XBoxStat.exe and put it in my Xpadder folder.

Posted

Yea I figured it out. I just removed it. I don't need to know when the battery is getting low anyway my controller starts to disconnect randomly that's usually grounds to change the batteries.

I'm glad there is finally a solution to this. No more button combo presses.

I am......Machine

Posted

Yeah, thanks to ZeroJay and his find everything runs perfect except I noticed that it's not sending esc while in HS. I can skip the intro and exit my games just fine but for whatever reason HS doesn't receive it. Personally I don't care about this cause I'm not gonna use my Xbox button to go in and out of systems but just wanted to point it out.

Edit: It would also be nice if this program didn't need to be actively running to work.

  • 3 weeks later...
Posted

So this little app works great, I've only just "finished" my first hyperspin install this week, and most of my setup had this app in mind and it's worked out quite cleanly.

But anyway, to nitpick: I noticed in RL there's an option to wait for the 'exit emulator' key to be held down for a certain amount of time before actually exiting, which is great, except it doesn't seem to work when I try to hold down the guide button on my controller, but works fine with esc on my keyboard.

I'd love to use the delay feature, any thoughts on how to achieve that? I'll be poking around in the source the redditor author provided tomorrow or the next day probably anyway, but would like any other input.

Posted

Probably because 360 controllers use xinput which ahk is not compatible with.

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."

RocketLauncher's Official Home

If you appreciate my work:
donate_button.png

My Apps:
Window Logger
Idle Volume Adjuster
ExplorerRestorer
Rom Folder Cleaner
Module Updater
My Guides:
How To Mod Guncons with Aimtrak

Posted

Hey guys I'm the one who made this, glad you're finding it useful! I just updated it by request with delay/hold support: http://www.reddit.com/r/emulation/comments/1goval/any_way_to_map_the_middle_xbox_360_button/camujj7

I just realised that I saved the INI file with UNIX file endings (\n instead of \r\n) so Windows' Notepad doesn't show it properly.

To avoid this, use any plain text editor that isn't notepad (I use notepad++). I'll fix this if I release another version, sorry for any confusion it caused :)

In the meantime if you only have notepad, just replace the contents of the INI with this:

[config]
; Change these to any decimal vkey codes you like.
; Default is 27 (escape).
; There is a list at http://cherrytree.at/misc/vk.htm
key_player1=27
key_player2=27
key_player3=27
key_player4=27

; delay (wait this long before "pressing" the key)
; in milliseconds: 1000 = 1 second
delay_player1=0
delay_player2=0
delay_player3=0
delay_player4=0

; duration ("hold down" the key for this long)
; in milliseconds: 1000 = 1 second
duration_player1=0
duration_player2=0
duration_player3=0
duration_player4=0

and save.

Posted
Probably because 360 controllers use xinput which ahk is not compatible with.

You say that, but I have noticed my wireless 360 controllers now exit all emulators when I hit back and start at the same time while I don't have xpadder going at all.

Was that intentional? because it's new for me in RL...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...