There is a little trick to figuring out a key signature’s name. When confronted with a key signature that consists of flats, look at the flat second from the far right. This flat is on the line or space the key signature is named after. One flat is F, since you can’t go to the next -to-last flat. To find the name of a key signature with sharps, look at the sharp farthest to the right. The key signature is the note a half step above that last sharp.
Key signatures can specify major or minor keys. To determine the name of a minor key, find the name of the key in major and then count backwards three half steps. Remember that sharps and flats affect names.