Bending pins already soldered to a Teensy will not end [well].
Machine headers are also shorter (at least the ones I've played with) than more common square cross section pin headers. There are two big catches to machine pins: very few insertion/removal cycles before they stop making reliable contact, and the force required to remove a large group of pins could make removing the Teensy even one time nearly impossible. ...
The parts I use are the Samtec SLW sockets and the TLW headers, part numbers SLW-114-01-T-S and TLW-114-06-T-S to be precise. These provide a mating height of just 6.6mm between boards, provided everything lines up correctly (you see in my picture mine doesn't ). You can probably even go lower with backside sockets, but I still needed some room between the Teensy and the carrier PCB to mount an SD socket.If i look at the solution from Epyon I can get to a bit more than 10mm.
When I am going for a semi-finished, non professional, final project, as in non breadboard prototype, I usually just solder the components with some 30+ awg silicon wire, tape them down with some thin 3m double side tape, and heat shrink it all. Heat shrink is fairly cheap so if you need to make changes then just cut if off, make your changes, and heat shrink it again. You can still push the buttons through the heat shrink and if you are using rotary encoders, then just poke a few holes in it.
Hi
I suppose that you also solder the wires directly to the teensy?
That's correct. It helps to have 2 of everything so you can test on a breadboard before soldering anything.