I come back after weeks to read last page and Blizzard still having problems with understanding crit chance?
There are two crit chance functions, one for weapons that shoot, and one for melee weapons. The two functions have a similar shape, but the melee weapon one starts out with a higher percentage, and also goes much higher (many people report that the melee crit chance can go up to about 60%, and have been banging Valve about it for months, but no word still)
For both functions, your chance percentage goes up based on how much damage you've done in 20 seconds, as someone has said (I thought it was 10 seconds for a while, so there, I'm wrong too). You can pretty much tell when you have max boost when you get on a ridiculous spree and your entire upper right is bordered in white (which I always thought was a really nice UI design to show bloodlust, as the higher the frequency of your kills, the harder it is to know what other dangers are happening around you until you calm down. Add to the fact that it takes 10 seconds for the kill messages to dissapear, and that's what led me to think crit chance measured your last 10 seconds).
Now, Medics and Engineers don't do a lot of damage directly, so in order to keep their crit chance high their function goes up from their patients and sentries respectively. Good Medics don't die and get lots of assists, and a good sentry placement is constantly firing and killing people. If you still don't believe this, then put on damage text and go play Medic and Engineer for a while. You'll see that you get to see damage text for damage done by your patients and your sentries.
To put up something constructive, I've started to put up TF2 videos of gameplay every few weeks. The quality isn't great and the text looks very big, mostly because I had to go to great lengths in order for the source recorder to work and not have my video card restart or tf2 crash every random number of minutes. Here's the most recent:
http://www.youtube.com/watch?v=r4dQdbMBbTE Please note that it was my first time playing in over a week, and the title of the video.