Game Development Community

GuiTextEditCtrl not always receiving input

by Jari · in Torque Game Engine · 01/19/2006 (5:09 am) · 2 replies

Hi,
For some reason the onKeyDown wont be always called for GuiTextEditCtrl when I type certain characters. The text edit ctrl receives most of the characters but sometimes I have to hold down 'p' (for example) until the control starts receiving input.
There seems to be at least one character/key that wont be read until it's hold down long enough.

Jari.

#1
01/20/2006 (2:55 am)
I found the reason for this, it's because of the global key bindings.
For example:
GlobalActionMap.bind(keyboard, "p", someFunction);

Now the TextEditCtrls wont receive p character.

So, should this be considered as a bug or should one just reset the global action map before using text edit controls or something else?

Thanks.
#2
01/22/2006 (11:35 am)
Just make your global map contain essential functions that users are not likely to be typing into a text box. Use function keys and combos. Put the other stuff into the keymap for the in engine part of the game. Then push that keymap when entering the engine and pop it when exiting.