Numpad whoes
by Manoel Neto · in Torque Game Engine · 02/02/2005 (10:40 am) · 3 replies
Hi,
For ages I've been bothered about not being able to use the numpad keys in the world editor. I tried tracking down the problem, found a few clues, but not a clear solution.
I began tracing the problem by debugging GuiTextEditCtrl's onKeyDown. It responded when the numpad keys were pressed, but they were not considered valid keys. But they work fine when you type in *before* loading a mission.
I couldn't find a clear reason to why this is happening... seems the way TGE retrieves the ASCII code for the keys changes when a mission is loaded, and then all numpad keys will return ASCII 0 and be considered invalid inputs. I found the function where the ascii table is built, but I'm not sure how much damage I can do down there (I prefer to stay out of the platform folder before improving my skills).
As usual, searching the forums or the resources for "numpad" returns nothing useful (in the resources' case, it returns nothing).
Can anyone give me some advice here?
For ages I've been bothered about not being able to use the numpad keys in the world editor. I tried tracking down the problem, found a few clues, but not a clear solution.
I began tracing the problem by debugging GuiTextEditCtrl's onKeyDown. It responded when the numpad keys were pressed, but they were not considered valid keys. But they work fine when you type in *before* loading a mission.
I couldn't find a clear reason to why this is happening... seems the way TGE retrieves the ASCII code for the keys changes when a mission is loaded, and then all numpad keys will return ASCII 0 and be considered invalid inputs. I found the function where the ascii table is built, but I'm not sure how much damage I can do down there (I prefer to stay out of the platform folder before improving my skills).
As usual, searching the forums or the resources for "numpad" returns nothing useful (in the resources' case, it returns nothing).
Can anyone give me some advice here?
About the author
Recent Threads
#2
I'm guessing it's got something to do with mapping in a 'foreign friendly' manner. The code attempts to consider non-english keyboards, so probably quite a few oddball keys aren't properly checked. Much of the magic is happening in actionmap.cc, which is surely touched every time you load a mission and set up actionmaps for your game.
02/02/2005 (11:20 am)
A quick glance through...I'm guessing it's got something to do with mapping in a 'foreign friendly' manner. The code attempts to consider non-english keyboards, so probably quite a few oddball keys aren't properly checked. Much of the magic is happening in actionmap.cc, which is surely touched every time you load a mission and set up actionmaps for your game.
#3
02/02/2005 (9:51 pm)
This is something we'll have to fix for the upcoming Torque-based editors. :)
Torque Owner FruitBatInShades