How would I go about practicing to memorize all the keys? Like which notes are in it, how many sharps/flats they have, which chords are in each key, which keys a certain chord can fit into?

Would I just write it all down on a piece of paper and stare at it and memorize? And do I just study and memorize everything on the circle of fifths?
what you should do is memorize the formulae... also the circle of fifths will hel you alot.

if you remember WWHWWWH (where W=whole step H=half step) then you can figure out any key in seconds also memorizing how many shaprs or flats are in each key also makes it easier.... for example I neve memorized the key of D as being D E F# G A B C# D I memorized it by saying "D has two sharps, so its the same as C with two sharps, sharps go in this order F C G D A E B (so first note sharped will be f then C etc.) [and for flats its the same thing backward so it goes B E A D G C F] there fore the notes must be D E F# G A B C# D"

I found this much easier than trying to memorize each key.

sharped notes = F C G D A E B
flatted notes = B E A D G C F
circle of fifths starts with C maj (no sharps or flats) then goes one fifth up to G major (1 sharp) heres a link to it http://en.wikipedia.org/wiki/File:Circle_of_fifths_deluxe_4.svg

now just memorize which notes are sharped first and which notes are flatted first, then memorize how many sharp/ flats are in each key. thats pretty much how I learned it, and now I can name the notes in any key right away. takes maybe two or three seconds tops before I know exactly which notes are there.

I hope that wasn't too confusing....

when it comes to chords check out musictheory.net under lessons there is plenty of things on chords, but with time you'll be able to recognize what chord goes where. but heres an easy chart
Major key
I ii iii IV V vi vii°
Minor Key
i ii° III iv v VI VII

(each roman numeral represents a note in the scale in order so for C major I=C ii=D iii=E etc. CAPS=major lower case=minor °=diminished)

hope this helped!
Quote by Dirk Gently
Some pieces are only meant to be played by people with six fingers on their fretting hand. Sorry.
It helped a little, since I already know my basics to theory. (chord building, scale building, determining a key from a group of chords etc). I just wanna know a
lot of these things instantly off the top of my head.

Sometimes my friend and I would come up with some chord progression and there would be a mystery chord in there that I would know what it could sound like in my head, but can't figure out how to play it. If I knew all of these keys and chords etc, I'd be able to figure out which chords can possibly fit in.
practice.... that will make it much easier, you can read and memorize everything you want but the only way you'll get to playing those chords properly is to practice applying the theory you have learned.
Quote by Dirk Gently
Some pieces are only meant to be played by people with six fingers on their fretting hand. Sorry.
I like what kryptic posted ... and .. take notice .. each of those notes

F# C# G# D# A# E# B#

Is the 7th degree of the scale that introduces it. THat is

C -- no sharps no flats
G -- F# -- play the GMaj7 arpeggio like so:


You see the one sharp in the key, it's the F# on the D string.

If you go up a 5th and play the same shape :


you bring the F# with you as the 3rd in D and add a C# as played on the G string

Go up another 5th (well, go down a perfect 4th but, enharmonically the same)


Again the third degree of the scale is the sharp (C#) that you added from the previous key in the cycle and the 7th (G#) is the sharp introduced in this scale.

This works really nicely up through F# .. great way to remember.

Of the reverse movement (backwards through the cycle of 5ths) is also telling.

Start on F on the A string and play:


There is B-flat at the 8the fret of the D string.

Now if you go UP a perfect 4th (enharmonically down a perfect 5th) you get:


So you play B-flat as the name of the new key and add E-flat ... which is the name of the next key and play he same pattern starting on E-flat gives:


So -- you went up a fourth, got the new key name and the 4th again is the new flat -- A-flat.

You do this same patter over A flat on the E string at the 4th fret you add G flat ...

So -- I find that these are helpful when learning the cycle of 5ths -- I think of the guitar neck.
If you want to learn the notes in the key you should do 1 each day in order of the cycle of fifths.
First key of C then G (withF#).
I don't actually do that cause I think it's pointless for me because I know where to play and if I want to I can get the notes out of the shape.
To memorize the chords, is really easy.
Just get this into your head:The first degree of a major scale is major, the second is minor ,third is minor, fourth is major, fifth major, sixth minor also your relative minor and the seventh is the odd one out, the diminished.
So Imaj IImin IIImin IVmaj Vmaj VImin VIIdim.
This is for every major scale since the intervals remain the same but with a different root.
And the eventh chords are Imaj7 II min7 IIImin7 IVmaj7 V7(dominant) VImin7 VIImin7(b5)