My outback ran out of gas. I brought fuel to the vehicle which started right up. I drove directly to a fueling station an fueled up the vehicle. When my wife went to start it the battery appeared dead. We jumped the vehicle and got it started. When it was started my wife asked me to drive it home . When I got in I noticed th tach was not registering and the odometer was flashing upon driving the ABS lite came on and the check engine lite came on. The vehicle made no strange sounds and seemed to run fine. When I got home I turned off the vehicle and could not get the key out of the ignition . After some fussing I turned the key on (withot being able to start the engine, the battery seemed dead again) put it in gear and put it in park, the key turned to the off position and came out of the switch. I tried to reset the computer by disconnecting both battery terminals an touching them together. I was then able to start the vehicle right up. Everything appeared to be normal until I went to test the drive the vehicle. I drove 50 feet and the gauges and lites began to flash again. I returneed the vehicle to the driveway where the key became stuck again. What happened? I would appreciate any advice.