These are all good suggestions. The bottom line is to get familiar with the keys that you are currently unfamiliar with. And to that, I would add learning what the notes are in each of the main keys, as that can help when learning songs and their chords. For example, I'm sure you know that the C-major scale is all the white keys -- C, D, E, F, G, A, B, C, and that the G-major scale is similar, but starts with G and sharps the F (F#). Well, I would try to learn those note patterns for all keys, such as Db-major being Db, Eb, F, Gb, Ab, Bb, C, Db. You could then do the same thing for the minor scales, as well.
And also, one of the first things I learned when I started learning how to play is the notes of all of the major, minor, diminished, augmented, major-7th, 7th, minor-7th, and diminished-7th chords. Like learning the notes of the scales, as you become familiar with these chords, you will more instinctively know what notes to hit when playing songs in keys with lots of sharps or flats. This could take a little while, but would be worth the effort.
I remember my teacher made me a chart that started with the notes of all of the major chords in root position, with those notes being called the 1st, the 3rd, and the 5th, as those are the positions of those notes on the major key scale. Then she wrote the following:
For a minor chord, start with the major chord and lower the 3rd by a semitone
For a diminished chord, start with the major chord and lower the 3rd and 5th by a semitone
For an augmented chord, start with the major chord and raise the 5th by a semitone
I forget exactly what she did for 7th chords, but I think she started with a major 7th chord (adding a B in the C major scale), as that
follows the notes of the scale -- (C, E, G, B for Cmaj7)
Then, lower that 7th by a semitone for just a 7th chord (C7 is C, E, G, Bb)
Add that "lowered 7th" note to a minor chord for a minor-7th chord (Cm7 is C, Eb, G, Bb)
and then, lower the major 7th by a whole tone and add it to a diminished chord for a diminished 7th chord
-- (Cdim7 is C, Eb, Gb, A -- technically, the A would really be called a Bbb -- B-double flat -- to keep in protocol)
She also noted the white-key/black-key patterns of the root-position major chords to help me learn them more quickly...
C, F, and G major are white, white, white
D, E, and A major are white, black, white
Db (and C#), Eb (and D#), and Ab (and G#) major are black, white, black
Gb (and F#) major is black, black, black
Bb (and A#) major is black, white, white
and B major is white, black, black
Learning that for all the main chords can really help you get familiar with playing in different keys. And once you learn the chords in root position, you start learning the actual notes of them (not just "flat the 3rd", etc) and you learn the different inversions of these chords.