## PPJoy mapping concepts

PPJoy allows you to change the way the joystick buttons and axes are mapped. There are three levels of mapping:

- The Default mapping is used when there is no more specific (interface or individual) mapping for a particular joystick.
- The Interface mapping mapping applies to all joysticks, without individual mappings, that connect to this interface type.
- Individual mappings apply to a single joystick.

If an indivual mapping is defined for a joystick it will always be used. If a joystick has no individual mapping the interface mapping will be used instead. If there is no individual or interface mapping for a joystick the built-in default mapping will be used.

The joystick mapping is used to transfrom the raw digital and analog values that PPJoy reads from a joystick into button presses and axis movements.

- Controls with an on-off motion are read as digital values. All the buttons, and the axes on most of the supported joysticks, fall into this category.
- Controls with a range of motion are read as analog values. Currently only Playstation controllers and the virtual joystick can return analog values.

A button press can be mapped in the following ways:

- As a digital value read from a joystick.
- When an analog control is moved to its minimum position
- When an analog control is moved to its maximum position
- As nothing, in which case the button will never be pressed

An axis can be mapped in the following ways:

- Directly as an analog value read from a joystick.
- Reverse of the analog value read from a joystick.
- Two digital values, one for minimum and one for the maximum axis position
- As nothing, in which case the axis will always be centred

Future versions of PPJoy will probably also allow you change the number of buttons and axes reported for a joystick. A later version may also emulate a POV (hatswitch) device.

## Changing the button and axis mapping of a joystick

Start by selecting the joystick to change and click on the Mapping... button.. A new dialog box, similar to the one below, should appear.

Here you are offered the choice to either the change the individual (for the joystick you selected before clicking on the Mapping button) or the interface mapping. The screenshots below illustrate how to change the individual mapping for a joystick. The interface mapping is changed in a similar way.

Decide whether to change the individual or interface mapping, then click on Next.

When no individual (or interface) mapping exist for the joystick you will only be offered the option to create a new mapping. If a mapping already exist you will be offered the chance to modify or delete the mapping. See the section Deleting a mapping for more information on how to delete a joystick mapping.

Click on Next after making your selection.

If you decide to create or modify a mapping you will see the following screen:

This screen will show you how many axes PPjoy will report to Windows for this device. You cannot change the number of axes in the current version of PPJoy.

Click on Next to continue.

This screen will show you how many buttons PPJoy will be report to Windows for this device. You cannot change the number of axes in the current version of PPJoy.

Click on Next to continue.

This screen will allow you to change the mapping for each axis. Note that playstation pads have two mapping modes - digital and analog mode. After configuring the mapping for digital mode you will be shown the same screens to configure the mapping for analog mode. Currently all other devices only have a single mapping mode.

An axis can be mapped in one of the following ways:

- Directly as an analog value read from a joystick, for example an analog Playstation pad. ('A xx' in the drop-down list.)
- An analog value read from a joystick with the direction reversed. ('A xx rev' in the drop-down list.)
- Two digital values (buttons or digital joystick axes), one for minimum and one for the maximum axis position. ('D xx' in the drop-down list.)
- As nothing, in which case the axis will always be centred ('nothing' in the drop-down list.)

The easiest way to set the mapping for a particular axis is to click on the Scan button in the Min column next to the axis you want to change. The following screen will appear:

Now press the button, or move the control in the minumum (up, left) direction, that you want to map to this axis. As soon as PPJoy senses any button press or axis movement on the selected device it will close the scan dialog and update the mapping page. (If an button is pressed, or an axis moved, before clicking on the scan button the mapping page will immediately be updated; and the scan dialog will not appear.)

When an analog value is selected in the Min column for an axis the Max column for that axis will be greyed out. This is because a single analog value completely defines an axis. When a digital value is entered in the axis minimum column another digital value must be specified in the maximum column for that axis.

Most interfaces will report the following values for up, down, left and right:

- D 0 Joystick is pressed "UP"
- D 1 Joystick is pressed "DOWN"
- D 2 Joystick is pressed "LEFT"
- D 3 Joystick is pressed "RIGHT"

When all the axis mappings are configured, click on Next. This takes you to the button mapping page.

The button mapping page operates similar to the axis mapping page. A button can be mapped in the following ways:

- Directly as digital value read from a joystick. ('D xx' in the drop-down list.)
- An analog value set to its minimum value (position). ('A xx min' in the drop-down list.)
- An analog value set to its maximum value (position). ('A xx max' in the drop-down list.)
- As nothing, in which case the button will never be pressed ('nothing' in the drop-down list.)

The scan button operates the same as it does on the axis mapping page.

Click on Next when you configured all the buttons. If the device has more than 16 buttons you will be shown the button mapping page again, this time for buttons 17 to (possibly) 32. If the device has more than one mode (like playstation pads) you will be taken back to the axis mapping page to configure the next mode.

After you configured all the buttons for all the mapping modes for the device you will be moved on to the finish screen.

This screen confirms that the mapping is complete. It is also your last chance to cancel without writing the mapping to the joystick driver. Click on Finish to write the new mapping to the driver.

### Deleting a joystick mapping

Start by selecting a joystick and clicking on the Mapping... button.

Select whether you want to delete the individual mapping for a joystick or the interface mapping. Then click on Next

If the individual (or interface) mapping you selected exist the option to delete the mapping will not be greyed out. If the delete option is disabled it means no such mapping exists (and there is nothing to delete).

Select the Delete option and click Next

This is the confirmation screen before the delete. You have to select Yes before the Finish button will be activated. After you selected Yes, click on Finish.
Back to the PPJoy user manual.