A-flat major was the flattest major key to be used as the home key for the keyboard and piano sonatas of Domenico Scarlatti , Joseph Haydn and Ludwig van Beethoven , with each of them using the key for two sonatas : Scarlatti 's K. 127 and K. 130 , Haydn 's Hob XVI 43 and 46 , and Beethoven 's Op .
A-flat major is the major key with the most flats that Domenico Scarlatti used in his keyboard sonatas , though he used it only twice - in K. 127 and K. 130 .