Irrlicht : can't call onEvent
<p>i'm new with irrlicht and i was trying to implement key events. I followed the irrlicht tutoriel on their website but it doesn't work.</p>

<p>Here's the code :</p>

<pre><code>class MyEventReceiver : public irr::IEventReceiver
{
public:
  MyEventReceiver()
  {
    for (irr::u32 i = 0; i &lt; irr::KEY_KEY_CODES_COUNT; ++i)
      KeyIsDown[i] = false;
  }

virtual bool OnEvent(const irr::SEvent&amp; event)
  {
    std::cout &lt;&lt; event.EventType &lt;&lt; std::endl;
    if (event.EventType == irr::EET_KEY_INPUT_EVENT)
      KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
    return (false);
  }

  virtual bool IsKeyDown(irr::EKEY_CODE keyCode) const
  {
    return (KeyIsDown[keyCode]);
  }

private:
  bool KeyIsDown[irr::KEY_KEY_CODES_COUNT];
};
</code></pre>

<p>Normally if i press a button the onEvent should be called but i can press any button i want it never calls this function. Of course i created a MyEventReceiver in the main.</p>

<p>Can someone who knows irrlicht help me please ?</p>