Most people honestly believe that there are only twelve tones per octave and that they are all interchangeable: G# could just as easily be A-flat. (Every other Sunday the NYTimes crossword puzzle makes that assumption so it must be so.)
But, in fact, the privileged few who play instruments with options know how many version of G# they have to produce in order to play any music well. Yesterday it was a trombonist who was talking to me about this. I have heard the same from sensitive violinists.
What is a pianist to do?
Listen. Strike the keys at different places so you can tell the difference between a G that resonates fully as a proper G should -- you get this result from striking the key at its tip -- and a G that, by virtue of releasing less resonance, might as well be deemed an Fx --the result of striking the key halfway toward the fallboard.
The options are much greater than the alphabet allows. Otherwise why would Brahms spell out 18 different pitches in his Waltzes, and Schubert 24 (count them) in the B-flat Op. post. Sonata.