Hwo to catch the Keyup message in Engine code?
by Prodigy Andy · in Torque Game Engine · 11/14/2006 (1:12 am) · 2 replies
I can catch the keyup message in winWindow::processKeyMessage() by using following code:
But I can't catch the keyup message in winWindow::ProcessMessages() by using the same method.
It's so strange because all keyboard message are sent to processKeyMessage() through ProcessMessages() .
Thanks.
Andy
static void processKeyMessage(UINT message, WPARAM wParam, LPARAM lParam)
if (message == WM_KEYUP)
{Con::printf("It is keyup message!" );}But I can't catch the keyup message in winWindow::ProcessMessages() by using the same method.
It's so strange because all keyboard message are sent to processKeyMessage() through ProcessMessages() .
Thanks.
Andy
#2
hmm, interesting.
Looks like processKeyMessage() being called from OurDispatchMessages() in winWindow.cc,
which is emptying the sgWinMessages queue.
11/15/2006 (12:50 pm)
Andy -hmm, interesting.
Looks like processKeyMessage() being called from OurDispatchMessages() in winWindow.cc,
which is emptying the sgWinMessages queue.
Torque 3D Owner Lateral Punk
Default Studio Name
virtual bool onKeyDown(const GuiEvent &event);
virtual bool onKeyUp(const GuiEvent &event);
for GameTSCtrl
then you will ensure that the GuiShapeNameHud passes input through via the modal flag.
Basic idea is that make sure something else isn't eating up your input, and all GuiControls can re-implement input virtual methods for mouse & keyboard.