"joystick 0" turns off MESS reading any USB or gameport joypads/sticks you have connected to your PC/Mac. It does nothing to the internal mappings.
As for the rest of your problem, you appear to be doing something horribly wrong, but I do not understand keyboard mapping well enough to tell you what. Perhaps next time Justin signs in he would know.