I am using the 2.1.0 version of Audacity on my Windows 7 Ultimate. I have connected my Keyboard (Yamaha PSR E-413) to the appropriate port in the PC so as to record directly. How should I select the keyboard as the input source to Audacity?
The USB port on a Yamaha PSR E-413 is for transferring song data and MIDI data, not for audio.
Audacity records audio.
To record the keyboard in Audacity you will need to connect the headphone output to a sound card that has line level or instrument level inputs (not a microphone input).
To be able to hear what you are playing while you record, you will either need to use a “splitter cable” so that you can connect the headphone output from the keyboard to both the “line in” connection of your sound card “and” to a pair of headphones (at the same time), or you will need to use a sound card that supports playing back through headphones while recording (most USB sound cards that have headphone sockets can do this.
Alternatively, you could record from the keyboard speakers using a microphone.
Also, we already have a FAQ for this that is worth reading: