Making Custom keybinds?

I was wondering if there was any way one could set a command to a key? I’m pretty sure this was doable in garrys mod by typing in the console "bind v ‘command’ " or something similar to that. Would it be possible in rust to bind, for example, the /location command to a key so I could get my coordinates much faster while I walk instead of having to stop and type it in every time?

I saw someone accidentally spam chat with like 10 t/ping (trying to find his ping but a typo). He apologized and said he lagged while trying to test out a custom keybind. So it is possible. I just don’t know how.

Well atleast I know it’s possible =/

Looks like that was a macro. I use them to log in as admin, do /players, /ping /history etc so I dont have to type it out each time. sometimes it misfires if the timing is off. This is doable with most gaming keyboards and software like autohotkey.