The GNU Radio DSP will provide a continuous carrier output.  That said, there is no native method within GNU Radio to key the carrier on and off to generate traditional CW signals.  CW must be created at the hardware level independent of GNU Radio flow graph.  This page will describe two simple methods to generate a CW signal for ordinary communication purposes.

One method to implelement CW is to use GNU Radio to generate a continuous carrier and key a down stream transmit amplifier.  Keying the Vcc of an amplifier or amplifier chain, with a measure of reverse isolation, will sound on the air as a good quality CW signal.  This method, keying the amplifier is the classic ‘old school’ analog method for implementing a CW transmitter.  Back in the day, for the ultimate CW signal quality, a crystal oscillator or a free running VFO were always ‘on’ not keyed.  The next stages in the transmitter amplifier chain were class C and were keyed.  This arrangement effectively turned the transmit signal on and off to generate a CW signal with minimal impact on the oscillator stability.  In any case, the greater the amplifier reverse isolation, the less residual carrier (back wave) that will be detected on the received signal.  In receive mode, the transmit amplifier must be disconnected from the antenna and the receiver input connected to the antenna.  One way to automate that station control process is described here: Gpio control of peripherals 

An alternate method to generate CW signals is to use MCW (modulated CW).  In this case, an audio tone, say 580 Hz is used to modulate a SSB, AM, or FM transmit signal.  An keyed outboard tone source is the audio input that modulates the transmitted signal.  The end result is a signal with a keyed 580 Hz tone.  With a SSB DSP, the single tone is essentially a traditional CW signal.  With AM, there will be keyed upper and lower sidebands, two CW signals of 580 Hz separated by 580Hz X 2 = 1160 Hz.  Not traditional, and acceptable on the UHF and microwave bands.  MCW with an FM transceiver is different in that the signal is not amplitude modulated, but  instead phase modulated.  The CW message of the constant carrier FM signal is only detectable by a suitable FM demodulator.  The CW keyed tones will be audible at the frequency of the keyed audio tones.

For MCW, my experience is that direct audio input into the audio signal Source of GNU Radio is preferred for best signal quality.  In this situation, the keyed audio output is directly input via the mic jack of the computer.   In this manner the amplitude of the audio tone is easily adjusted and is stable.  If, instead, the keyed audio is output from a speaker, into a microphone, and input into the flow graph, the audio amplitude is difficult to control, and ambient sounds picked up by the microphone contaminate the CW signal.