bind <key> ""
You can bind keys to say things, in local chat and in other available chats.
Here are some examples:
bind m "say guards!"
bind m "say /shout Hello kingdom people!"
bind m "say /vil Hello village people!"
bind m "say /t <name> Enemies in local run awayyyy!"
To list all key binds use the console command