object.number

Overview

The number assigned to an input device's axis. This number is based on the number of axes found on one input device. For example, if an input device has 4 axes, then they will be assigned numbers 1, 2, 3, and 4 in the order that they were found. You can use this number to uniquely identify an axis belonging to one input device. This axis number can be used as an index with the array returned by its input device's getAxes() function.

Gotchas

This axis number is the only reliable means of identifying an axis belonging to one input device. This is because it's possible for the axis type property to return duplicate type names, and this is especially true if the types are "unknown". This is also because the type names do not always match what was actually pressed on the device (especially true for gamepads and joysticks designed for another platform). If you need to display the axis name to the user, you should display this axis number instead of the type property.