So far as I know, there's only one composer who actually wrote music in all the major and minor keys: Johann Christian Heinrich Rinck (1770-1846), who wrote two sets, each of 30 pieces, covering even the rarely used enharmonic keys (a# minor, C# Major, Ab minor, and Cb Major). One set, Op. 55 for organ, was Preludes; the other, for piano, Op. 67, was 'Exercises'.
A brief bio, though one which doesn't mention his unique achievement: http://www.naxos.com/person/Johann_Heinrich_Christian_Rinck/26299.htm