Each such scale is built upon a principle note, which is called the tonic or keynote. The tonic is the first degree of the scale. Both the major and the minor scales of a given key take the notes that they need from a foundation scale, which is called the twelve-tone chromatic scale.
Because there are 12 possible keynotes and two basic scales, major or minor, this means that there are 24 basic keys belonging to the key system. Each key is named by the note that is taken to be the tonic or first degree of the scale in conjunction with the type of scale used—major or minor. Each key whose tonic is a fifth higher requires a further sharp in the key signature. Each key whose tonic is a fifth lower requires a further flat in the key signature.
The best way to recognize the key signature is:
1. The key Signature of no sharps or flats is C major
2. The key signature of one flat is F major
3. For flat keys: If the key signature includes flats, you look at the next-to-last flat—the one that’s next to the farthest or last one on the right. This note determines the key signature.
4. For sharp keys: If the key signature includes sharps, the method is different. What you want to remember here is that the last sharp in the key signature represents the seventh degree of that particular scale, so that the tonic of the scale is the next note up. In other words, look at the last sharp and the next note up is the key.
Each key is a complete scale system—whether major or minor—together with the various chords that can be derived from the notes of that particular scale. Many musicians and composers have spoken of particular emotional and coloristic associations with particular keys. Therefore, the key of C major is often associated with purity, Dmajor with feelings of triumph, while the key of F major speaks of the pastoral world of nature. Similarly, Bb minor is often described as being a key filled with darkness and despair, while C# minor is often linked to intimate religious feelings (Rita Steblin: A History of Key Characteristics in the 18th and Early 19th Centuries).