How about a handgun like the sword in the movie blade, that if you grip it and don't disable the booby-trap mechanism blades will swing out, disabling the person attempting to sue the weapon.
In all seriousness, though, making guns safe is not all that difficult. I have a TT pistol made in Yugoslavia sometime in the early 1960's; in order to be sold in the US, a safety switch blocking the trigger had to be added. The safety switch was not necessary, though. First of all, the gun is single-action; you have to cock the hammer in order to fire the gun. The hammer has a half-cock, which does two things: it blocks the trigger (basically your safe-mode--you can't fire the gun), and it keeps the hammer off of the firing pin, so that if you dropped the gun it would not fire accidentally. On top of that, it has a magazine safety--if you remove the magazine from the gun, the trigger is blocked. This is particularly useful because many people assume that a gun without a magazine is unloaded, but there may still be a round in the chamber. In the case of this pistol, no magazine = no firing. If the hammer is pulled back and there is a round in the chamber, you can drop the magazine and prevent the gun from firing; then you can pull back the slide and eject the round. The hammer can also be manually decocked, which is very dangerous if the gun is loaded, but doable if for some reason you had to disarm it without ejecting all the ammo.
My point here is that this gun, which is at least 50 years old, is actually very safe to handle and operate. I don't really think we need fancy technology and shooter-identification systems. Hell, the M1911 features a safety-grip so that you cannot pull the trigger unless you're firmly gripping the gun. To make guns safe, you just have to not do anything that is extremely stupid and you're fine. Don't keep a gun loaded when you don't have to. Adding safety features and technology won't prevent violent crimes--the shooter in the recent mass shooting was using a rifle that he purchased himself and was firing it intentionally, so no safety feature would have made a difference. People make a big deal about how the shooter used an AR-15, an "assault weapon," but in reality it was just a generic semi-automatic rifle. Any hunting or sport rifle could do the same, so in order to prevent shootings you'd basically have to ban all firearms of all kinds, and even with the ban shooters would still get and use them. I doubt a suicidal or insane shooter would care too much about breaking a firearm ban if he already had intentions of committing mass murder. Even with a bolt action rifle, he could have done the same or greater damage (bolt action = increased accuracy, better aiming).