so i have grasped a basic knowledge of keys and the chords that go with them, however I like to play lots of chords that aren't shown on the basic key graphs as well as finger style guitar. How do I put this sort of music into a key? is it a case of seeing which notes you are playing within the chord and comparing that with the key charts?
Can you clarify?

For example, in C major, is it the case you want to add in Eb major as a passing chord, or is that you want to use chords like Cmaj9, G13 etc?

Eb does not belong to the key of Cmajor, but can still be used.

The other two are in the key of C major.

cheers, Jerry
Oh, this can get real deep, real fast...
"When I do good, I feel good. When I do bad, I feel bad. This is my religion." -- Abraham Lincoln
yeah that helped one element, so if it fits with other chords for example in the key of c its okay, so thanks!
However, say I'm not using any kind of main chords like A, B, C, D, E, F, G and their relative sharps, then how do i know what key my song or the song im playing is in?
I tried thinking of a response, but I agree with Virgman. One would have to know more about your piece of music/chord progression to help answer your question. To give a general answer is hard in this case.