I'll be the first to admit I don't know a great deal about joysticks, but to get the replies started...
Most joysticks I've seen have a setup interface where you can define which each movement/button press should be such as tilt to the left = left arrow, "fire" button = spacebar etc.
I'm only assuming, but from there it
may just be a case of having the code look for a press of the left arrow key, which (I assume) would also see the Joystick being tilted to the left as this key being pressed. etc
Hopefully someone with more experience with this comes along very soon to enlighten us both