I think all of the source code for what you're after is under Firmware/Source/Composite_Duck - Multi on the GitHub repo.
As for not bricking the Ducky, I understand your caution. AFAIK (and I could be wrong on this one) that if something goes wrong, the Ducky can always be re-flashed, but if you're still nervous after making your modifications, send me the compiled .hex firmware and I'll see if I can get it working on my Ducky.