Hold Up and press P. Works in the air and on the ground alike.
Be warned: the weapon is gone for good. If you want it back, you'll have to find another of the same kind.