+1 to it being a difficult task if you have low grade gear.
Eliminating all unwanted noise can become a pretty much endless chase after the holy grail of signal purity. From my own experience (as an amateur) it seems that every single link in the chain can contribute some kind of hiss, crackle or hum. The usual supects include the quality of your house power supply, poorly shielded cables (which can pick up noise from all the other electrical activity), crummy sound cards, cheap microphones, amps, pedals, bad connections and contacts, etc etc. The computer itself can be contributing noise in a variety of ways too.
For instance, I've just been hooking up a system to record with, and working through some of the same issues. When I hooked up the keyboard I was getting a lot of noise from it into the mixer. Changing cables didn't help. But there was also a USB cable attached to the keyboard that's used when the keyboard acts as a midi controller. When it's being used to either provide midi input, or play it back, that cable works just fine, and doesn't seem to contribute any hum. But when the keyboard is providing audio through the output socket then, even though the midi signal is set to 'off' in the keyboard software then the midi cable still completes some sort of unwelcome circuit and transfers noise to the audio. Disconnect the midi cable and the noise on the audio goes away. But then you start noticing the lesser noise that accompanies the note decay from the keyboard..... That's probably going to be unavaoidable with that model keyboard, and fortunately it's not enough to be a problem anyway.
Another difficulty cropped up with the mic. If I plugged it straight into one part of the chain the signal was weak and I had to crank up the setting so high further along that it started to cause hum. That was solved by plugging the mic into another place, where it was getting some sort of 'pre-amp' boost (at least that's how it seemed to me). Anyway, the stronger signal meant that I was able to turn the other setting down to a less cranked level, and that hum went away.
So it's pretty much a process of elimination. If the mic causes problems when plugged into the sound card, then it might work better if the audio was routed through a USB or firewire audio interface, or.... or... or.... there's no one answer unfortunately. Good luck with it all.