On screen hint when player neares object

Hey,
could anyone point me to a tutorial or pass me a code snippet on how to create the effect of showing (for example) the ‘E’ letter, if the player comes close to an object which can be interacted with by pressing the E key? You know, like it is done in nearly any FPS for opening a door or something like that.

Thanks in advance!