They've been around for quite some time -- my brother, when he worked for the Illinois State Police, sent me a flyer on them. This was more than ten years ago.
"Pen guns" were used during WW2 by the OSS and SOE. There was also one disguised as a (smoking-type) pipe.
Cane guns had a vogue during the last quarter or so of the 19th Century. And there was a gun back then for bicyclists that doubled as a tire (or tyre) pump.