Like so:

I have checked the key injections to see if there's a problem. Since I'm using Irrlicht I have to convert some of the key codes to CEGUI::Key::Scan codes. But I'm pretty sure I haven't done anything wrong.
Code: Select all
bool PEventReceiver::injectSpecialKeysToCEGUI(wchar_t key)
{
switch(key)
{
case KEY_BACK:
{
CEGUISystem->getDefaultGUIContext().injectKeyDown(CEGUI::Key::Scan::Backspace); //This code makes it possible to delete the text. If I comment it out I can't delete the text.
return true;
}
case KEY_SPACE:
{
printf("This code gets executed.\n"); //This gets printed in the console. So CEGUI::Key::Scan::Space gets injected into CEGUI.
CEGUISystem->getDefaultGUIContext().injectKeyDown(CEGUI::Key::Scan::Space);
return true;
}
default:
return false;
}
}Is there something I need to do to be able to write spaces in the text box? I'm sorry for pestering you with questions, but I don't really understand how this works yet.
Thanks in advance.
