“his gun went off half cocked in his pocket.”
OR
his half cocked gun went off in his cockpit.
His gun went off, now he is half cocked.