Ноw can I send from one part of program keyevent
Posted: Mon Dec 05, 2005 09:24
I try to use this command:
But my event listener (which successfully listen for keyboard events) do not catch it. Why?
Code: Select all
System::getSingleton().injectKeyDown(Ogre::KC_F12)But my event listener (which successfully listen for keyboard events) do not catch it. Why?
Code: Select all
void Listener::keyPressed(KeyEvent* key) {
printf("key pressed (%d)\n", key->getKey() );
if (key->getKey() == KC_F12 )
mShutdownRequested = true;
key->consume();
}