Zsnes has the Keyboard set for the input set as Default. So if you have a Pad/Joystick the first stop is to set Pad/Joystick as Default.
Click on Config like the above Picture shows and then click Input #1.
Once the Dialogue opens click on the Set Keys button like shot above shows. Then use your Pad/Joystick to select the Digital/Analogue Up to set it to that. It will automatically move to the next Selection. Down, Left, Right, Start, Select, A, B, X, Y, Left and Right Triggers. Don't worry too much if you make a mistake, just click on the Box that is wrong and select the right one on your Pad/Joystick to continue the Auto next cycle.
You should end up with something like the shot shown above. Once you have made sure the settings are correct, click the X button to the top-right of the dialog. The same applies if you want to change Buttons for the Keyboard. Just click on the Button and apply it to where you want it assigned for the use of the Keyboard. Now you are ready to start using a Pad/Joystick or Keyboard how you like it in your Games.