Enter every key on the Circle of Fifths. For major, start at C. For minor, start at A. Go clockwise. G flat and F sharp are the same notes, so they are both excepted. If you put C flat (B), it will not count in this case, because it is a natural key.