Do not think about the key at all beyond the
3. initial reading of the key signature at the beginning of the piece
Probably primarily this one. You have to stay mindful as you go along. Also be aware that music can move to another key, especially the Dominant one.
Practising scales as suggested is good, but also to get the sound of the major scale in your head. That way in the key of A major, if you miss a G# it will "sound wrong" to you.
You also want to know your major keys - the relative minor come from them. Personally I'd avoid memnonics because a) you have to rattle through them all, b) if you're like me, the names will start changing. Father Charles can become Uncle Jed.

For sharps: Play a C chord with your 5 fingers. Move your hand to the top note (G), that's the key with one sharp which is right under the G. (F#). Play the G chord. Move your hand to the top note (D) - the next sharp is right under it (C#). The key of D has both these sharps. Move your hand to the top note (A) - ditto. This is a concrete way at the piano that you can get the circle of fifths, because you have 5 fingers.