Since folks may find a new need to use JoyToKey considering the 3dmygoto mod, figured I'd update info from an old thread here.
I recently reinstalled JoyToKey and had a LOT of problems getting it working on my rig. Ashamed to say it took hours, all due to a lot of unknown things that I found out the hard way. Here's some easier ways I found that may help others.
Problem 1: Can't figure out which joystick shown in JoyToKey is the one that I want to work with.
Related: The one I want to work with may not even be one that is shown.
Starting with the second issue, make sure all joysticks are shown. The default shown will be two, but if you have more, they also can be shown (up to 50). Go to the options tab and note how many "joysticks" are shown (devices may not actually be a joystick). If you have more than 2, change the number accordingly and refresh the screen. That insures that one of those is the one you need to deal with.
First issue, which one do I configure without a ton of trial and error? (I did the trial and error 🙄 ) Before I got anything working, I figured this out:
Go to your JoyToKey installation folder and find the file "JoyToKey.ini". Open it with Notepad and look at the bottom section to find your devices as seen by JoyToKey. (As you can see, one or more of the "Joysticks" can be a device with no buttons that you could edit at all...in my case, rudder pedals):
In my case, the buttons I wanted to configure were on device number 1, or "Joystick 1" in JoyToKey. However, it could have been any of the 3 detected. I needed to set the keyboard emulation that I wanted on the "Joystick 1" tab.
Problem 2: I don't know which joystick buttons to edit. The ones shown in the game button mapping utility for the controller I want to use do not seem to work.
Do not go by the button numbers that you see in the game for the buttons you want to use. What matters to JoyToKey is what Windows uses for your button numbers. This is often one number different, since the game probably counts "0" as a button number, and Windows doesn't.
Go to the Start menu and find "Game Controllers" in the list of programs under "G", and run that. Then select the controller you want to use, and go to "Properties". There you can actuate the buttons you wish to use and see the button numbers that Windows assigns them. These are the button numbers you'll need to edit in JoyToKey:
Edit those joystick buttons to emulate the keys you want, on the correct joystick tab:
With JoyToKey running, start the game and go to the Key mapping utility. Pick an empty field and push the appropriate buttons. (Instead of doing this, I stupidly started a SP mission each time and checked to see if the zoom was working...🙄 ) If working, it should now show the keyboard emulated key(s) instead of the original joystick button number(s) that it originally did (in this case, it originally was "joy1_b23"):
Problem 3: It still doesn't work
Associate the game with the profile you've created. In JoyToKey, go to Settings > Associate profiles with applications...(A). Then enter the path to the IL-2 game executable as shown below (assuming your game installation locations and folder names are the same as mine....they can differ so use what is correct for you). The auto-detect feature is buggy and locked up my mouse and the game, although I still was able to finish the process using the keyboard only. I advise CAREFULLY entering the path manually as shown below. REMEMBER that the "Il-2.exe" file is a CAPITAL "I" and a LOWER CASE "L". It won't work if you get that wrong. Also do not neglect to put spaces exactly as shown:
Problem 4: IT STILL DOESN'T WORK!
Set the JoyToKey.exe to run as administrator every time. Browse to the file in it's location, then select the file, Properties > Compatibility tab, and check "Run this program as an administrator":
You may want to set JoyToKey to automatically run minimized to the system tray. In that case, when you start it, if you need or want to make any changes, you'll need to click on it in the system tray. Otherwise it can work without the window being up or any indication in the taskbar. Personally I prefer it that way. Go to Settings(S) > Preferences...(P):
Other other considerations:
You may also want to set JoyToKey to start automatically at startup. This is done by placing a shortcut to the executable in the Windows "Startup" folder. Path...C:\Users\(Your Account Name)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. However, although I tried this and could see the program listed under the Startup section of the Apps menu, and it was enabled, it still would not start. Reason: I found out that if you set a program to run as administrator, it does not have permissions to run automatically, so it won't run that way if you do that. So don't bother trying it unless the program somehow works for you without being set to run as administrator. This may have something to do with whether or not you have UAC (User Accounts Control) enabled or disabled.
Obviously this was all a lot more complicated than it should be. I almost gave up. If you can't get it working feel free to knock on my door, maybe I can help.