I was looking at Dvorak's Humoresque (op 101 n 7) : it's mostly in G♭ major, in the middle it changes to F♯ minor. This would have looked more natural for me if F♯ major instead of G♭ major were used. I understand that F♯ major and G♭ major are equivalent (enharmonic), so I wonder why this later was preferred. Both have six accidentals. I guess pianists are more familiar/confortable with flats than sharps? Or perhaps is there other reason? I come from guitar, and we are much more familiar with sharps, so I'd preferred F♯...
Of the 12 major keys, F♯/G♭ is the only one that can be reasonably notated in two ways (for example, C♭ and C♯ are far more awkward than B and D♭). Both F♯ and G♭ are in common use, but G♭ is rather more common. Why? If the music sticks to the diatonic major scale (as this piece largely does), then both keys are equally complicated, but major-key music often introduces secondary dominants such as V/ii and V/vi (seen in mm. 10 and 16 of this piece respectively) that are written with naturals in G♭ but would require double sharps in F♯. It is slightly more unusual to see the brief modal mixture that shows up in the score as double flats. So the key choice is a toss-up, and Dvorak chose the slightly more familiar G♭.
As for the resultant mismatch with the middle section, pianists are used to seeing enharmonic key changes when moving to the parallel minor (e.g. the D♭ maj-C♯ min shift in Chopin's 3rd Scherzo, Fantaisie-Impromptu and the "Raindrop" Prelude).
One possible answer is that he didn't want to be confusing by using a true parallel minor. Key changes are intended to be a change in tonality, and he didn't want to be going from one kind of Gb to another (or one kind of F# to another), so he decided to go from a flat key signature to a sharp key signature.
Also consider what it would have meant if he had done a true parallel minor key change and gone from Gb major to Gb minor. Gb minor has 9 flats (b and e are double-flat). That would've been a bit ridiculous for sure.
Pianists are pretty non-discriminatory when it comes to keys. Sure, some pianists prefer some keys to others, but there's no clear bias in the literature like there is for wind instruments and jazz musicians.
Some composers do have different things they associate keys with, however. For example, a sharp major key might have connotations of being bright, while a flat major key feels more introspective and deep. A pianist might have their own conceptions that would influence their interpretation.
To conclude, I believe the likely answer in this case is that Dvorak wanted to avoid a straight parallel minor key change, and was faced with the choice of Gb major to F# minor or F# major to Gb minor, and chose to go with not having a 9-flat key signature.
It could also just have been that he started the piece in Gb before he got to the key change.
OR I could be completely wrong and it was an editorial decision on Godowsky's part.
For many of these pieces, especially older works, it's less the decision of the composer as the editor, whose job it is to turn the raw manuscript into the sheet music on your stand (and everyone else's).
In this case, G♭ major to F♯ minor was likely due to simplicity. G♭ major has 6 flats; that's quite a few, but consider that for many instruments, it's easier to read flat keys than sharp keys (the E♭ alto saxophone, for instance, is so named because its written C is actually an E♭. When playing a piece in the "concert key" of E♭, the sax part would be written in C, so sax players get three flats "for free" and would read a piece in G♭ as being in their E♭).
Most of the pieces I read through in high school were in "flat" keys for this specific reason, from F and B♭ major all the way to D♭ and G♭ major. This preference feeds on itself, such that keys with a lot of flats are more familiar to most instrumentalists than keys with a lot of sharps.
F♯ minor is equivalent to A major (3 sharps). It's simply the only way to sanely mark that key. It's also a common key signature for string instruments, if somewhat rare for winds. This makes the key common in full orchestral settings.
I'm not familiar with Dvorak's Humoresque, but assuming he wanted a section in the parallel minor (i.e. G♭ minor), then a 9-flat key signature would certainly be awkward. F♯ minor is certainly warranted here.
A number of years ago I read a review of Gustav Mahler's 9th Symphony, where the reviewer mentioned the first movement "...alternated between D major/minor..." and the finale "...D♭ major/minor...", so I can't see anything wrong with describing works in an enharmonic context when convenient. For the record, Mahler uses C♯ minor for the parallel minor sections of his 9th's Finale.
While we're on the topic of F♯/G♭, and Mahler, notice how he does this very modulation in his 10th Symphony. Just look at all those accidentals!
(Never mind that Mahler scores a fortissimo orchestral tutti shortly afterward using nine of the 12 tones on the chromatic scale, simultaneously!) :-O
A few observations:
No major or minor key, since it is a 7-note scale with the tonic repeated, can have 9 flats (or sharps.) At most, it can have 7. The problem with Gb minor is not the number of flats, but rather that the normal notes of the key would require double flats to stay diatonic, which would create even more confusion if those double-flatted notes would need to be altered. Theoretically, a Gb minor key would be related to Bbb Major, which does not exist. Theoretically, the notes would in Gb (natural) minor would be Gb Ab Bbb Cb Db Ebb Fb Gb.
I read through the piece and found it much easier to remember a key change when, instead of having to cancel some sharps, I went completely from flats to sharps. One of the things about notating music is that you want the performer (assuming a professional) to be able to grasp as much information as possible the first time playing through the piece. If they have to go back and decipher a lot, it needs to be made easier to read. If a player switches from F# major to F# minor and keeps forgetting to not sharp notes in the minor, then perhaps the notation needs to be Gb Major to F# minor because the key change is much more clear.
In this particular piece, the key change occurs not only with a change in harmony but also a change in mood and style. This is much more clear when going from flats to sharps rather than simply keeping sharps in place. It marks a complete change. If it was only a change in harmony, perhaps moving from F# major to F# minor would have been appropriate.
Overall, how music is notated is extremely important for clearly and quickly communicating to the performer what is happening in the music.