A court has heard for the first time Oscar Pistorius' version of events on the night he shot dead girlfriend Reeva Steenkamp.