Game Development Community

How to capture keyboard lctrl?

by weihua · in Torque 3D Professional · 07/01/2010 (7:43 pm) · 2 replies

I am using T3D 1.0.1.

I want to crouch player by pressing left control button.
I tried:
moveMap.bind(keyboard, lctrl, doCrouch);

Nothing happens when press left control

But if I try:
moveMap.bind(keyboard, lshift, doCrouch);

Player crouches when press left shift.

Does anyone know how to capture lctrl?
Thanks : )

#1
07/01/2010 (8:06 pm)
Have you tried

{ "lcontrol", SI_KEY, KEY_LCONTROL },
{ "rcontrol", SI_KEY, KEY_RCONTROL },

moveMap.bind( keyboard , "lcontrol", doCrouch );
#2
07/04/2010 (8:49 pm)
That works :)
Thank you Chris!