If you are being attacked, its too late.
Depends on what you mean by being attacked. If the bad guy is pointing a gun at your head already then yeah it's too late. But usually you have some time to react in a home invasion robbery, if your house is not completely insecure.
If its not too late, you should run, or hide behind something first.
What, run where? You're upstairs in your bedroom, and you hear the sound of breaking glass downstairs and someone forcing the patio door open. You run? Jump out the window? Leave the kids in their bedroom and just take off running?
If you hear gun shots in the distance and go investigate with your gun out
I personally don't know anyone who is so mentally retarded that they would do that. If you hear gunshots in the distance, as in not on or near your house, you absolutely do not run out into the street looking to "investigate". Leave that to the cops. You lock your doors and windows, and if you have a gun you get it ready just in case. In any event you dial 911.
If its for protecting your house, a finger print reader is better than locking up your guns from children if you lack the time to unlock them in an emergency.
My iphone has one of the best fingerprint readers on the market, according to smartphone reviews. And it's not even close to being reliable enough. It's pretty much useless when my hands are sweaty. And in a life and death situation there's a pretty good chance my hands are gonna start sweating.