Used GlovePIE for Windows?
Developer’s Description
By Carl Kenner
In the GlovePIE window you type or load a simple script. For example to control the WASD keys with a glove:W = glove.z > -50 cm;S = glove.z < -70 cm;A = glove.x < -10 cm;D = glove.x > 10 cm.
You can also use GlovePIE to play Joystick-only games without a joystick, or keyboard-only games with a joystick. Or you can use it to create macro buttons for complex keystrokes.You can even use it to control multiple mouse pointers with multiple mice.