There are 12 notes in music: A, A#, B, C, C#, D, D# E, F, F#, G, G#
#-Sharpe. Or instead of putting # there you could put a b so for example it would be Ab, b means flat.
A, B, C, D, E, F, G- Are all natural notes, they are the white keys on a piano.
You will need to get a diagram of the notes of the fretboard. You can find them on the internet, the diagram of what the notes are and where they are.
So to work out the key you need to take all those notes from each chord in the song, a chord is useally made up of 3 notes, so take all those notes and write them down, don't write the same ones out twice, just all the different ones. When I say notes I mean when you form a chord the notes are what you are playing on the fretboard so again look at your fretboard chart and see what the notes are. So for example for the chord of A played its in normal open posistion the notes are: E, A and C#.
Once you have them all written out you need to find what scale they match up to, now what it fits it what key it will be in...the starting note or root note.
Now the pattern of gaps for the Major Scale is TTSTTTS and for the Minor Scale it is TSTTSTT, now if you look at both of those the all the Mior scale is doing different is starting on the 6th notes of the Major scale.
Right now T- means Tone and S- means Semitone. T= 1 Fret on the board and S= 2 Frets on the board.
So now you know all that you can take your notes and try to match them up the notes by looking at the 12 notes and trying all different starting places till you find the correct place which has the right pattern of gaps, once you have the correct sequence that compares correctly with either the Major pattern of gaps or Minor. Always look for Major first.
Once they match up, the starting note will be the scale and the key.
When you have all the notes you can also work out what the chords can be. So for example we have notes that make up the key of C major (a very commen key) You can work out what the available chords are.
This you must remember:
The first chord is always MAJOR
2nd is always MINOR
3rd is always MINOR
4th is always MAJOR
5th is always MAJOR
6th is always MINOR
7th is always DIMINSHED
So for the Key of C Major our chords are C, Dm, Em, F, G, Am, Bdim
I hope that is a help to anyone. If not say so and il see if I can explain any better.