A key in music is a group of pitches or scale upon which a piece of music is based.

A key in music is like choosing a special set of notes that sound good together, like picking colors to paint a picture. 

Quizlet
What is a key in music?