How can I affix keyboard keys to a suit jacket?
The simplest approach is a hot needle.

Hold a rather thick needle with pincers (pretty much any kind) and heat it up - stove fire will take seconds to make it glowing hot, but a candle flame should suffice. Melt the hole through both sides of the stubs. The needle should be considerably thicker than the one you'll use for sewing because the holes close up a bit when you remove the needle.