According to an article in Sun Myung Moon's paper we have an idea about how the gun "just went off"
How are the TSA regulations dead stupid? Let me count the ways...
"The pilot has to take his gun off and lock it up before he leaves the cockpit, so he was trying to secure the gun in preparation for landing, while he was trying to fly the airplane, too," said David Mackett, president of the Airline Pilots Security Alliance. "In the process of doing that, the padlock that is required to be inserted into the holster pulled the trigger and caused the gun to discharge.
...
(TSA) has refused to adopt standard carriage rules recommended last year by the Federal Air Marshal Service.
...
pilots handle the gun as many as 10 times per flight, the association estimates.
...
must use a holster used primarily as a home child-safety lock. A padlock is inserted through the holster and trigger guard, but, if inserted backward, it can trigger the gun
How are the TSA regulations dead stupid? Let me count the ways...