Game Development Community

Strange bug with edit controls and numlock/shift

by John Vanderbeck · in Torque Game Engine · 09/23/2005 (8:58 am) · 6 replies

I'm having a very strange problem with the various text edit controls, the main one i'm workign with being guiTextEditCtrl.

The way they are SUPPOSED to work is if you use the arrow keys left/right to move through the edit control, or Home/End keys, WITHOUT holding down shift, then the cursor position is changed withouth highlighting blocks of text. If those keys are use WITH holding down shift, then you move the cursor position and highlight blocks of text.

However on one machine here what i'm seeing is most unusual. This has to be some relation between my keyboard and TGE. I know it isn't the keyboard all by its lonesome because it works as expected in other applications.

What i'm seeing is essentially the NUMLOCK key is acting like a SHIFT LOCK in so much as how it affects the arrow keys and home/end keys. It doesn't cause capital letters however. If I have numlock OFF I can use the arrow keys to move without highlighting text. If numlock is off and I hold down shift, it still moves the cursor position WITHOUT highlighting text. Basically with numlock OFF I can move the cursor position but can NOT highlight text. If numlock is ON, then using the cursor keys or home/end to move the cursor position moves the cursor plus highlights the text. Regardless of whether or not I hold down shift. Basically with numlock on it always highlights text regardless of whether or not I hold shift.

As I stated above, this only seems to happen on this one machine here. The others work as expected. However I can't lay the blame SOLEY on the keyboard/machine because in any other application besides TGE it works as expected. So there is some odd bug in TGE, or maybe not so much as a bug but something that just isn't working quite the way windows does.

#1
09/23/2005 (9:41 pm)
Mysterious. Do you have any disability software on that one system?
#2
09/23/2005 (11:13 pm)
Mine's acting wierd as well. When I click a GUI Control and move it once, i can't move it again, it becomes deselected. I cannot give a GUI a name because the edit right next to apply doesn't come into focus and allow me to type. <-- Just a few things, i figuared i'd add, not sure if they've been fixed.
#3
09/24/2005 (7:50 am)
@Ben
No, and all of the Windows accesability features are turned off. I just double checked.
#4
09/29/2005 (1:21 am)
I'm looking for a reference to keypad key names. I want to bind keypad keys seperately from top row number keys. ie. in default.bind.cs ...

moveMap.bind(keyboard, "numpad 9", myKeypadFunction);

I'd love to have a pointer to source code where I can look these up for myself. Thanks.
#5
09/29/2005 (4:02 am)
What compiler are you using?

I know on my machine with current HEAD if I compile a RELEASE version half the time X and Y appear to get reversed.
It doesn't happen in DEBUG, and when I started modifying the code to track it down it went away.
After removing all my changes it came back..
Then I started tweaking the RELEASE optimization settings and finally made it go away permanently.
Got to love bugs in your compilers optimizer. ;)

I'm using MS VC 7.0 (.NET 2002).

-Jerry
#6
10/02/2005 (11:20 pm)
7.0 is freaky and unsupported. Please upgrade to 7.1. :)

Stewart, the easy way to find this stuff out is to use the options screen to bind the key in question, and see what's written to config.cs. The harder way is to read through actionMap.cc in the sim subdirectory.