F is for keyboard targeting of autopilot. When you press it and rotate your ship, it will highlight viable targets, and when you release it will lock on to recent highlighted.
You can do the same thing by clicking the mouse on a target.