Is it possible to run a keybind from the main menu?

Whenever I launch GMod, I always hit the ` key to open the console, then type the connect command to my favorite server. It’s a bit annoying as the IP is a bit long, is there a way to bind the connect command so I can launch it at the console?

You can do that by using the bind console command. Here’s an example:



bind "F12" "connect 123.45.678.9"


Replace F12 with the key you want and 123.45.678.9 with the IP you want.

That’s what I used and it doesn’t work.