class MyEventReceiver : public IEventReceiver
{
public:
	virtual bool OnEvent(const SEvent& event)
	{
		if(event.EventType == EET_KEY_INPUT_EVENT)
		{
			if(event.KeyInput.PressedDown)
			{
				switch(event.KeyInput.Key)
				{
					case KEY_ESCAPE:
						//デバイスを終了させます
						device->closeDevice();
						return true;
					default:
						return false;
				}
			}
			return true;
		}
		return false;
	}
};
 |