Remembering which tones are in which keys can be challenging. To help you with this process, we have created an alternative to the Circle of 5ths for the Major keys, called the Lines of 7.
The Lines of 7 is a memory tool for Major keys, which can provide a faster way to memorize the number of sharps (#) & flats (b) in every key & what those sharps & flats are.
Using this system, we can see that the keys of the same letter name [e.g. D & D-flat] have a total of 7 sharps & flats. When sharps & flats are added together from 2 keys with the same first letter, they always equal 7 [# + b = 7].
Examples: the key of C has zero sharps & flats; the key of C# has 7 sharps & the key of C-flat has 7 flats. The key of E has 4 sharps; the key of E-flat has 3 flats.
The order of accidentals (#/b) are in the middle box above. Sharps & flats are 'added' in the opposite order [Sharps: F-C-G-D-A-E-B & Flats: B-E-A-D-G-C-F ].
The other essential thing to know is that for a root of the same letter name (the pairs above), what is sharped in one key is what is natural in the other. Or, what is flatted in one key is natural in the other. They are 'opposites'.