1. What do you mean, "command"? You can bring up the console by pressing the tilde key. --> ~
2. In the game, press the tilde key to open the console, then enter /unbind followed by the key you want to unbind (or remove the macro from). For example, /unbind f2 will remove whatever F2 does, leaving F2 an unused key.
3. Make a macro by typing into the console /bind key say comment. So if you want F2 to say "I wish I was as good as JANE", you would type into the console:
/bind f2 say I wish I was as good as JANE