sometimes it starts and sometimes it does not.... on 1995 Mazda B4000

I have a Mazda B4000 truck and it wont start sometimes. If I put the key in and turn it over if the door locks go up and down it won't start, If I put the key in and the locks don't go up and down it will start. Whats up with that?

Asked by for the 1995 Mazda B4000
I think there's a fault in the theft deterrent system. Get the vehicle to an auto electric shop or a Mazda or Ford specialist. If the problem's in the Generic Electronic Module (GEM) which controls many functions like dooorlocks, light systems, wipers, etc. then it needs to be addressed by a specialist.
Here's a directory link for you: