I guess it would be the same way half-life does.
Choose joystick look in some option. Then when you bind the keys just press the button that you want that one assigned to. If it doesnt work, then HL just isnt compatible with that joystick.
Personal experience, dont use joysticks. They will get in the way of the 100 things you can do if you have all the keys of a keyboard at your disposial.