The diacritical marks recorded after the clef in the staff to indicate the key range used in the music are called key signatures.
In modern European music theory, the reason why the key domain is represented by the key signature is because the European concept of key domain is often grasped through its expression on the keyboard and staff. The same natural seven-note scale, when the player selects different temperaments from the twelve temperaments to form different key ranges, will appear in different key selection methods on the keyboard.
Since the notation of black keys on the staff is by adding # or b in front of the notes of the white key positions, several black keys included in the key range are also represented on the staff. Represented by a number of # or b signs, these rising and falling marks are written on the left end of each line of the staff and on the right side of the clef, becoming a symbol of the key range used in the music.
Extended information:
The corresponding relationship between the pentatonic scale range and the staff key signature has formed certain specifications in the process of using staff notation for modern Chinese folk music.
The pentatonic system has only 5 phonemes in a tone range, while the heptatonic tone range represented by the key signature has 7 phonemes. The two must not match. The specifications followed when using the heptatonic notation to write down the pentatonic tunes are: leave the two phonemes of fa and si blank in the movable solfa method, and record the palace sound in do phoneme.
The fa and si squares at both ends of each line are covered and not seen. The correspondence between the five phonemes in the middle and the sharps and flats written at the left end can be shown. The correspondence between each pentatonic system and the key signature used.
This specification determines which tunes of different pentatonic modes can be written with the same key signature. Together with the European convention of using key signatures in major and minor keys, it forms "a key signature with the seventh key signature". "Corresponding tonality and mode" are the following specifications. Take the key domain (the key of A) with three # signs as an example: when using the remaining key signatures, the relative relationship of the following five lines remains unchanged, and only the note names in the first line are moved and replaced, and the note names in the third and sixth lines remain unchanged. The names of the notes within the line have also been changed accordingly.
Reference: Baidu Encyclopedia-Tune Signature