Advanced Features of JoyToKey
Virtual joysticks (a.k.a. SHIFT-key function)
Assume your joystick has only 6 buttons, but you want to assign 10 different key inputs to your joystick buttons. What can you do?
Then, you can configure extra key assignments for a virtual joystick number and you can switch the key assignments by pressing a special joystick button (a.k.a. SHIFT-key button).
For example, by default you're using key/mouse assignments defined for Joystick #1.
But in the example below, you can switch to key/mouse assignments
defined for Joystick #3 whenever "button 3" is pressed.
Switch across multiple key assignments
JoyToKey allows you to assign two or three sets of key-assignments for a single button, and switch among them in several ways.
- Switch in rotation
In the sample screenshot below, key-assignments will rotate as below whenever a button is pressed.
"A -> B -> C -> A -> B -> C-> A -> ..." - Switch based on press-duration
Input can change depending on how long the button is pressed.
- ex) small jump key if a button is pressed less than 300 milli-seconds
- ex) big jump key if a button is pressed more than 300 milli-seconds - Switch based on analog input level
For analog stick inputs, the assignment can change depending on the analog input level.
- ex) small stick input => slow movement key
- ex) large stick input => fast movement key
Button Alias (Mapping) function - Combine multiple definitions (e.g. "SHIFT + Mouse Wheel")
How can I configure a horizontal scroll (SHIFT + Mouse Wheel) for a single stick (button) input?
JoyToKey has a powerful function called "Button Alias", and it can be used for two different scenarios:
- Assign more (virtual) buttons beyond the number of buttons physically available
- Assign multiple functions for one button input
For assigning multiple functionalities to a single input (such as SHIFT key input + Mouse cursor/wheel movement), you can define the button alias (mapping) functionality from "Options" -> "Button Mapping".
For example, in the screenshot below, Button19 is configured to be triggered when stick-left is pressed. Next, let's assume you configured stick-left as a SHIFT key and Button19 as a wheel rotation. Then, when stick-left is pressed, Button19 will be also triggered, so in total "SHIFT + wheel rotation" will be emulated.
It is also possible to configure some button (e.g. Button22) to be triggered only when both Button5 and Button6 are pressed simultaneously. Then, you can assign 3 different functionalities for two buttons: Button5 alone, Button6 alone, and when both Button5 and Button6 are pressed.
Define a priority among multiple joysticks
In case you have multiple joysticks and you want to always use one of them as "Joystick 2" (or any other joystick number),
you can define a priority/preferred number for each device.
(Menu: "Preferences" -> "Configure joysticks")
In this window, you can also configure the axis mapping for Stick1 and Stick2.
Command line arguments
JoyToKey supports the following command line arguments. For normal usage, you don't need to use them, but they could be useful in case you want to create a shortcut to control JoyToKey without using a graphical user interface.
- Usage:
- JoyToKey [-r] [profile]
- -r
- In case JoyToKey program is already running, it'll send a message to the running instance and forces it to refresh the list of joystick devices. This command line argument can be used for creating a shortcut to detect newly connected joysticks.
- profile
- JoyToKey will be started with the specified profile. In case JoyToKey program is already running, the specified profile name will be sent to the running instance and the active profile will be switched. This command line argument can be used for creating a shortcut for switching the profile.
Change the location of configuration files
By default, configuration files (JoyToKey.ini and profiles) are stored in either
- “JoyToKey” folder under user’s Document folder (if installed from installer)
- or in the same folder as “JoyToKey.exe” is placed (if installed from zip file)
Besides, when you launch JoyToKey, you can pass a profile as a command line argument. Then, JoyToKey will be started by using the specified profile and its folder for loading/saving profiles.
Further, JoyToKey allows you to forcibly set the desired location of JoyToKey.ini file (which contains your preferences as well as the license registration information) and the location of profiles through registry setting. However, please note that the direct edit of registry can be a potentially dangerous operation, so it is only recommended for advanced users who understand what the following means. Please use it at your own risk.
- Run “regedit” program (Registry Editor)
- Create a key “HKEY_CURRENT_USER\Software\JoyToKey”
- Create a string value “IniFilePath=c:\Whatever\Folder\JoyToKey.ini” in case you want to stick to a specific JoyToKey.ini location
- Create a string value “DataDir=c:\Whatever\Folder” in case you want to use a specific folder for storing/loading profiles (You probably don’t want this for using a launcher)
Next: Useful TIPS