Only for HC05: As stated earlier, some models of the breakout board do not have the key pin, instead they have an EN (enable) pin or WAKE UP pin which may or may not be connected to any pin just like the STATE pin. In that case you'll have to solder a wire to the 34th pin of the bt module. I soldered a male header to mine but if you can't solder or don't want to, then you can just hold a wire (the pointy end of a male to male jumper wire would be convenient ) while connecting the Vcc to 5volt. Once the bt module is in AT mode, you can release the wire.
HC06 does not require key pin.