To open the console, press the tilde key ~ or the key below the ESC key.
To create a key bind, type bind <key> say "<command>" in the console. For example, bind b say ".d all" will deposit all your money whenever you press the b key.
To remove a key bind, use the command unbind <key>.