Graffitti,
This is an old guide I put together from a different forum, anyway this is a cut and paste job, but it should work for you:
I thought everyone knew how to make custom binds. I guess not. So here is how you do it.
First, for those that don't know what a bind is: A bind is when you press one key and the computer sends a message to the server for all to see instead of having to type it out by pressing t then whatever you want to say. In other words if you want to be able to say "Nice shot" when someone kills you just by pressing one key.
How to do it:
Open the console by pressing the tilde key. This is the tilde key symbol ~
Next type in this code exactly as it appears below, with your variables.
/bind x "say I hate you"
Where: x is the key you want to press for the bind to work. Make sure it is not a key you use for a game function. Where: I hate you. Is what you want to say.
The lower numerical "f" keys are a good place to put your binds. If you bind to a "f" key you must type the number out like you would on a forum "f3" to get it to work, don't press the "f3" key in the console when you are setting the bind up. In other words, type f, then 3 into the console.
Colors, have you ever wondered how you get binds in color? all you have to do is type ^2 before the letters you want to be in color. All the letters after the ^2 will be in color until you change the color again. So:
/bind x "^2I hate you"
would be displayed in game as I hate you by pressing the x key.
variables:
You can use any number key from 0-9 to change them, here are the colors for each number:
^0 = black
^1 = red
^2 = green
^3 = yellow
^4 = blue
^5 = light blue
^6 = purple
^7 = white
^8 = Green
^9 = grey
I lifted the colors off the internet and pasted here, I don't know if they are accurate or not, but you get the idea. One final thing, if you press the tilde key and nothing happens your console is turned off. You have to go to game options and enable it. I am not sure, but it may be turned off by default.
And one more last thing, I might have led some people to bind on the f1 and f2 keys. Don't make a custom bind on those keys or you will not be able to vote yes or no. So bind from f3 up. If you do bind the f1 and f2 keys all you have to do to make it go back to voting is type this:
/bind f1 "vote yes"
/bind f2 "vote no"