downloadjoystick2mouse menuhelpjoystick2mouse menuscreenshotjoystick2mouse menusupport mejoystick2mouse menuhomejoystick2mouse menu
Joystick 2 Mouse



Figure 8: “Select Action” and “Action Type” sections under Actions
Figure 9: “virtual key” action selected
Figure 10: “mouse movement” action selected
Figure 11: “combined” action selected

Joystick 2 Mousehelp


Theme - A Theme is a group of actions that has something in common, and the main reason to use them, is to organize the actions in smaller groups so it’s easier to find and configure them.

Theme also lets you create two actions that do the same thing, but in different programs, the consequence is different. For example: You can create a “virtual key” action that presses the ‘x’ keyboard key under the theme “Keyboard Letters”, and call it “x key”, and you can create a second action that presses the ‘x’ keyboard key under the theme “Winamp”, and call it “play”.

This example really exists in the default actions file.



Action Name - The name of an action is a way to understand what the action does without knowing how it does it. For example, you can find the action “Start Menu” in the theme “Windows Operations”. There is no doubt that you know exactly what will happen when this action will be activated, but you don’t have to know that what it’s actually doing is pressing the “Ctrl” and the “Esc” keys.



Action Types – There are three kinds of actions:

1. “Virtual key” actions. Each “virtual key” action can press or hit a keyboard key, or a mouse button.

2. “Mouse movement” actions. Each “mouse movement” action can move the mouse in any angle.

3. “Complex” actions. Each “complex” action is a combination of actions (of any kind) that are defined above it. Notice that a “complex” action can contain other “complex” actions.



Push Type - The push type of an action can be “Hold” or “Hit”. If you set the push type to “Hold”, the action will continue until you stop it, but if you set it to “Hit” it will start, and stop immediately. For example, if you want to cause an action to run as long as you push the joystick button that activates it, you should set its push type to “Hold”, and if you want it to be a short execute, you should set it to “Hit”.



Threshold - The Threshold is the value of this attribute sets the “Dead Zone” of the joystick. While the joystick is in “Dead Zone”, the program refers to it as it’s still in the middle.



Sensitivity - How much the axis should move to cause the program update its state.



Axis Type - There are two types of axes: “Horizontal” and “Vertical”. This purpose of this attribute is to display the correct direction of the axis when you configure it (if the type of an axis is “Horizontal” the program will display its direction as “Left” and “Right”, and if its type is “Vertical”, the program will display “Up” and “Down”).



A “virtual key” action is has a “virtual key” value that can be a character (for example ‘x’) or a hexadecimal number (for example “0x58”). By the way, the hexadecimal value for the ‘x’ character is “0x58”. You can find a table of “Virtual Keys” mapping at the MSDN Library.



A “mouse movement” action has 5 properties:

1. Direction – the direction (in angles) that the mouse should move (Up = 0).

2. Absolute – determines whether the mouse should move relative to its position, or move to an absolute position on the screen. Set its value to “true” is you want to point using the stick, otherwise it will just move to the edges of the screen, and to the middle.

3. Delay – the update delay of the mouse movement in milliseconds (every how many milliseconds should the cursor move).

4. Speed – the maximum speed (pixels/sec) of the cursor (the initial speed is always 0).

5. Acceleration – the acceleration of the cursor (pixels/sec2)



A “complex” action is an action that is built from combined actions.

Every combined action has the default properties of an action (“theme”, “name”, and “pushtype”). The theme and name attributes of a combined action should be the theme and name of an action that is found before the current “complex” action. The “pushtype” property on a combined action overrides the push type of the action that this action points to. For example, the “complex” action “Left Mouse Button Double Click” has two combined actions: both of them points to the same action: “Left Mouse Button”, and the push type for both of them is “Hit” although the push type of the action “Left Mouse Button” itself is “Hold”. This means that if you activate the “Left Mouse Button” action, it will push the left mouse button until you deactivate it, but in the “complex”, the left mouse button will be pushed and released twice (what makes a double click).







How Joystick 2 Mouse works or “Inside Joystick 2 Mouse”:

The first thing that “Joystick 2 Mouse” does when it start, is to configure itself according to its “configuration file”. The configuration file is a file named exactly like the program’s “.exe” file, with an addition of “.config” at the end.

By default the name of the “.exe” file is “Joystick 2 Mouse.exe”, so the default name of the configuration file is “Joystick 2 Mouse.exe.config”.

If you rename the “.exe” file, you have to rename the configuration file respectively.



What does the configuration file contain?

The configuration file contains general information about the program’s configuration.

To be more specific, it contains the following data:

1. The name of the “actions configuration file”.

2. Whether the program should start with windows.

3. What profile is assigned to each of the joysticks configured on your “Windows”.

The configuration file is a XML file that it’s main node is “Configuration”.

The nodes that come under the main node are:

1. The “Actions” node.

2. The “LaunchOnStartup” node.

3. The “Joysticks” node.

The “Actions” node is the node that tells the program where to look for the actions it’s going to use. It has an attribute named “filename”, that its value is the name of the file that contains the actions. This node must exist, and the “filename” attribute must exist also.

The “LaunchOnStartup” node is the node that tells the program whether it should start whenever “windows” starts. It has an attribute named “value”, that its value can be “true” (if you want the program to start with “windows”) or “false” (if you don’t want that to happen). This node doesn’t have to exist, if it doesn’t exist, the program will create it the next time you save its configuration. The default value for its “value” attribute is “false”.



The “Joysticks” node is the node the node that tells the program what profile it should assign to each of your joysticks, what joysticks are enabled, and what is the best picture that describes your joystick. It doesn’t have any attributes, but it contains the nodes that set the profile, picture, and state for each joystick.

These nodes has three attributes:

1. The “ID” attribute, that determines the joystick this node is configuring. This attribute must exist, and its value must be in the range of 0 and 15, according to the ID that “windows” assigned to the joystick.

2. The “filename” attribute, that sets the file name of the profile for the joystick. This attribute doesn’t have to exist, but if it doesn’t exist the joystick has no profile, so it will do nothing.

3. The “enabled” attribute, that determines whether this joystick is enabled or not. The default value for this attribute is false, so if it doesn’t exist, the joystick will be enabled.

4. The “picture” attribute, that sets the file name of the picture for the joystick. If this attribute doesn’t exist, or the program cannot find a file with the name set by this attribute, the joystick will not have a picture.



What does the Actions file contain?

The Actions file contains all the actions that the program can perform.



The Actions file is also a XML file. The name of the main node is “Actions”.

The Actions file describes the properties of each action.

Every action has at least three properties:

1. Theme.

2. Name.

3. Push type.



A “virtual key” action is represented in the XML by a “VKAction” node. This node has an additional attribute named “value” that its value can be a character (for example ‘x’) or a hexadecimal number (for example “0x58”). By the way, the hexadecimal value for the ‘x’ character is “0x58”. You can find a table of “Virtual Keys” mapping at the MSDN Library.



A “mouse movement” action is represented in the XML by a “MouseAction” node. This node has 5 additional attributes:

6. Direction – the direction (in angles) that the mouse should move (Up = 0).

7. Absolute – determines whether the mouse should move relative to its position, or move to an absolute position on the screen. Set its value to “true” is you want to point using the stick, otherwise it will just move to the edges of the screen, and to the middle.

8. Delay – the update delay of the mouse movement in milliseconds (every how many milliseconds should the cursor move).

9. Speed – the maximum speed (pixels/sec) of the cursor (the initial speed is always 0).

10. Acceleration – the acceleration of the cursor (pixels/sec2)



A “complex” action is represented in the XML by a “ComplexAction” node. This node has no additional attributes, but it has children, that represent the combined actions, that this action activates when it’s activated.

Every combined action is represented in the XML by a “CombinedAction” node. This node has the default attributes of an action (“theme”, “name”, and “pushtype”). The theme and name attributes of a combined action should be the theme and name of an action that is found before the current “complex” action. The “pushtype” attribute on a combined action overrides the push type of the action that this node points to. For example, the “complex” action “Left Mouse Button Double Click” has two combined actions: both of them points to the same action: “Left Mouse Button”, and the push type for both of them is “Hit” although the push type of the action “Left Mouse Button” itself is “Hold”. This means that if you activate the “Left Mouse Button” action, it will push the left mouse button until you deactivate it, but in the “complex”, the left mouse button will be pushed and released twice (what makes a double click).



What does a profile contain?

A profile is the part of the configuration that actually configures your joystick. It sets what action is activated by each of your joystick’s buttons.

A profile is also a XML file (what else could it be??). The name of the main node is “Joystick”. The main node has the following attributes:

1. The polling delay of the joystick (every how many milliseconds should the program check the state of the joystick.

2. The ID of the joystick this profile is designed for.

3. The name of the joystick this profile is designed for.

The last two attributes don’t have to exist. The main purpose of them is to warn you if you use this profile on a joystick other than the one these to attributes describe. If these attributes don’t exist, this profile has no preferred joystick, and you will not be warned if there is a change in your joysticks Ids or names, and if you have more than one joystick and somehow their Ids changed, you will not know why you joysticks don’t do what you configured them to do.



Under the main node there are three other nodes:

1. “ShiftButtons” node – under this node you set the shift buttons of the profile.

2. “Buttons” node – under this node you set the buttons you want to configure in this profile.

3. “Axes” node – under this node you set the axes you want to configure in this profile.



Under the “ShiftButtons” node there are nodes named “ShiftButton”, and each one of them has an attribute named “buttonNumber”. The order of this nodes determines the order of the shift buttons you configure, and the “buttonNumber” attribute determines the number of the button that will act as a shift button. For example: if you want button No.10 to be the first shift button, and button No.9 to be the second shift button, you will write two “ShiftButton” nodes, the first one’s “buttonNumber” will be set to 10, and the second one’s “buttonNumber will be set to 9.



Under the “Buttons” node there are nodes named “Button”, and each one of them has an attribute named “number” this attribute determines which button you configure by this node. Under this node you have a node called “Actions” and under the “Actions” node there are nodes named “Action”. Each “Action” node has three attributes:

1. “number” – the number of the action (if you have configured shift buttons, the action that its number is 0, is the action that will be activated if no shift button is pressed, the action that its number is 1, is the action that will be activated if shift button No.1 is pressed, and so on).

2. “theme” – the theme of the action you want to activate.

3. “name” – the name of the action you want to activate.



Under the “Axes” node there are nodes named “Axis”. Each one of them has five attributes:

1. “name” – the name of the axis can be one of the following: “X Axis”, “Y Axis”, “Z Axis”, “R Axis”, “U Axis” or “V Axis”.

2. “sensitivity”

3. “threshold”

4. “type”

5. “swapped” – determines whether the axis directions should be swapped.

Under the “Axis” node you have two “Direction” nodes, each direction has an attribute named “name”. Each direction’s name can be “Up”, “Down”, “Left”, or “Right”, depends on the axis type. Under each Direction you have a node named “Actions” this node is exactly like the “Actions” that is under the “Button” node.



This is how “Joystick 2 Mouse” works. And again you don’t have to change this XML files yourself that’s why I made the “Configuration” dialog box.

Back to General Help