I'm trying to figure out what the correct technique is for locating a key on the piano keyboard. As far as I can tell, there are the following clues (names invented on the spot):

"absolute position", i.e. the ability of locating with closed eyes a certain key on the keyboard.

"relative position", i.e. combining the knowledge of the current position of your hand on the keyboard and the knowledge about the size of intervals on the keyboard. This works both in space ("one fifth upwards from where my pinky is") and in time ("the same key that my thumb played two notes ago").

"keyboard shape", i.e. slightly grazing the black keys and using the gaps B-C and E-F to deduce the location of the hand.

"direkt looks", i.e. taking your eyes off the score to directly look at the keyboard.

Obviously I try to avoid 4, although I sometimes cannot avoid it (especially for large jumps). I'm pretty bad at 1, while 2 works okay (especially once I had some time to practice the piece). 3 also works, but I'm not able to do it fast enough for most pieces. So far I haven't used 5 too much.

What I'm wondering: Is any of these techniques the "preferred" one? Or is the golden way a combination of some of these? Should I try to train these techniques individually, and if so, are there special training pieces?

Some works have lots of notes. A pianist can't possible play the notes by picking them out one by one-- instead, a pianist will (unconsciously) break the parts into scales, arpeggios, and chords. Melodies can be thought of as scales or chords with notes "missing," i.e. to play a melody composed of C E Bb I might shape my hand like a C-dominant chord and play the notes one by one, skipping G. It is way faster for me to put my hand in the shape of a chord and subtract a note than it is for me to construct the chord note by note as I go. In principle, this is quite similar to the way fast typists will type words in one quick motion instead of hunting and pecking letter by letter.

This is why some of the most difficult pieces are in keys with lots of black notes-- they'd be infinitely harder to play if they were all white notes. This is also why pianists practice scales and arpeggios so religiously-- if you can play those well, it makes it far easier to play tonal music.

I always practice a song very slowly, and look and where I need to put my hand after a large jump. After playing the same jump over and over at varying speeds, I kind-of know where it is automatically. Also, by the time you can preform a piece, you should have it memorized, so that you don't need to look at the sheet music at all. Staring at your hands is obviously not much better, but at least then you can look at your hands if you need to. Also, as for pieces that help you with being able to jump large distances without having to look at your hands, Maple leaf rag is great. Both hands jump large intervals consistently throughout the song. Or anything by Scott Joplin is good.