Game Development Community

Detecting keypress?

by Ben Mathis · in Torque Game Engine · 06/27/2007 (1:31 pm) · 1 replies

I'm trying to detect when the player presses buttons on the keyboard. Ideally I would like a keypress (for the "j" button for example) to trigger a callback function either in the C++ engine code or in TorqueScript.

What would be the best way to create this kind of generic keypress event callback?

Thanks for the help with this beginners question.

#1
06/27/2007 (2:05 pm)
Observe the file "starter.fps\client\config.cs"
or perhaps "engine\gui\utility\guiInputCtrl.cc" but I don't think engine changes should be necessary.