Game Development Community

Trying to bind 'enter' to command.

by Anders Jacobsen · in Torque Game Engine · 07/14/2005 (7:17 pm) · 5 replies

Is it 'illegal' to bind the enter/return key(s)?

In any case, using the bind below I'm unable to make hitting enter call up the activateChat() function.

moveMap.bindCmd(keyboard, "enter", "", "activateChat();");

Any pointers? thanks :)

#1
07/14/2005 (7:22 pm)
Ok. are you making sure you delete your DSO's and delete config.cs? That's all i can think of. I dunno if enter is used somewhere else.
#2
07/14/2005 (7:25 pm)
I wanted to bind enter to chat as well.
#3
07/14/2005 (7:33 pm)
Hmm...try just puting

moveMap.bindCmd(keyboard, "enter", "", "echo(\"Enter pressed\");");

into the console, and see if it echos.

You might need to change the \" to /" im not sure what slash is to be used.
#4
07/14/2005 (7:34 pm)
How unseasoned of me. Now it works :) This makes me soooo happy :)
#5
07/14/2005 (7:35 pm)
Ah, you're right kc, I should have done that for easier debug :)

Thanks all, it works now :)