Use a clock pulse to trigger a custom function periodically to check the serial buffer using the INPUT$(1) command.
A$ = INPUT$(1)
A$ will contain the ASCII text string (single character in your case) whenever a CR is received. Otherwise, A$ returns an empty string. You can then check the first character in A$ using "ASC" function to determine if you wish to turn ON/OFF the output.