Is there a way to "bind" keys to commands?

Author Topic: Is there a way to "bind" keys to commands?  (Read 1046 times)

Similar to source games I am wondering if it is possible to do something like
bind o "canvas.setContent(NoHudGui);"
So I don't need to keep typing in commands.

moveMap.bind(keyboard, "key", "command");


moveMap.bind(keyboard, "key", "command");
Does it work for console commands?
If so, can you give me an example on how to input it in as it is currently not working for me.
Here's what I put in.

moveMap.bind(keyboard, "n", "canvas.setContent(NoHudGui);");

Use MoveMap.bindCmd instead.

If you're looking to get rid of the console, there's Script_FilmMode