Capturing Enter key for GuiTextEditCtrl
by Bryce Bangerter · in Torque Game Builder · 07/17/2006 (10:20 pm) · 1 replies
Using a GuiTextEditCtrl how can I capture the enter key to trigger a function call? Basically I've got a dialog box with a single text edit control on it. I want to have pressing enter call the same function my OK button calls.
Associate William Lee Sims
Machine Code Games
For example:
new GuiTextEditCtrl(NameInput) { // blah blah blah goes here altCommand = "testAndSetName();"; };You can also set this in the GUI editor (there is a field for it called AltCommand). Don't forget to put a semi-colon at the end of your command!