A key from its code: a tonic (a letter with an optional ♯ or ♭, # and b too) and a mode, 'G:major', 'Bb:major', 'F#:minor' — any key of up to seven sharps or flats.
#
b
'G:major'
'Bb:major'
'F#:minor'
When the code names no such key
A key from its code: a tonic (a letter with an optional ♯ or ♭,
#andbtoo) and a mode,'G:major','Bb:major','F#:minor'— any key of up to seven sharps or flats.