A key is a code from signs agreed to be used to convey a secret or private message. The etymological origin of the term is found in the Latin word clavis, what does it mean key .

A key is also the sign or combination of signs that allows certain devices to operate or enter a restricted space. This use of the concept is very common in Internet where the keys or passwords allow a user to access their personal email account or other service (“The key to my email account is my daughter's birthday”).
These two meanings of the notion of code are linked to its etymological origin, since the key functions as a key to access a secret message or private information and content.
On the other hand, a key is something fundamental or decisive , which allows to explain or justify something: "The key to victory has been the goalkeeper's performance", “Tomorrow will be a key day in the triple crime trial”, “The key to success does not exist even if everyone is determined to look for it”.
In the architecture , it is known as a key to the stone that is used to close an arch or a vault.
The concept in music
In the field of music , a key is a sign that is written at the beginning of the staff to determine the name of the notes that will appear next. The most used key in music is the treble clef .
The function of a musical key is to locate who interprets a certain melody within a hue, using those notes that are harmonically associated with each other and associating them with the spaces and lines of the staff.
There are many possibilities of keys and positions in the pentagram, however, only seven of these are used. It is important to note that so that a melody plotted on a stave has meaning and coherence it is necessary that it contains a key at the beginning ; In addition, it can change throughout the piece. When they are done modulations it is not necessary to change the password, if it will return to the original tonality, but if the change is resounding and will be maintained for the rest of the work, it is necessary to change the password used.
The instrument that plays the score must conform to the range of notes imposed by that key . The fundamental objective of the key is to clarify as much as possible the writing, avoiding everything that can be clarified so that the reading of said score is simple and the performer can also understand the thread that the composer had to choose one or another note, within a tonality.
Seeking greater clarity is that certain keys have fallen into disuse. Such is the case of the SOL key in the third, because your tessitura and the name of the notes is exactly equivalent to the DO key first and therefore it doesn't make much sense that there are several keys to expressing the same and one of them was chosen, which has charged academic and universal character.
It is worth mentioning, in case it is not clear, that the key objective of the code is mark the tessitura in which said piece must be interpreted . The fourth DO being the key most used in piano scores and indicates that it will be based on the central DO.