Hi guys,
Im trying to implement a kind of hotkey system for my ingame panels, but Ive
run into an annoying issue: as soon as a panel is given keyboard input
rights (SetKeyboardInputEnabled true), all the key events are swallowed by
the panel. This was expected though, but the problem Im having is that I
can't find a way of redirecting to the HL2 client the key events I dont
handle in the panels. I've tried using engine->GetLastPressedEngineKey() and
engine->Key_Event( iLastTrappedKey, false ) to fake it, but it doesnt seem
to have any effect. Here's how Im using it:
void MyPanel::OnKeyCodeTyped(KeyCode code)
{
if( code == KEY_ESCAPE )
ShowPanel( false );
else
{
int iLastTrappedKey = engine->GetLastPressedEngineKey();
engine->Key_Event( iLastTrappedKey, false );
}
}
Any ideas/suggestions welcome!
- Spk
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders