This is the code I use for injectingKey's:
Code: Select all
bool keyReleased(const OIS::KeyEvent &e) {
// Injecting a backspace
if (e.text == 8) {
mGUI->injectBackspace(mPointer->getLeft(), mPointer->getTop());
return true;
}
// Ignore non-printable or "unsafe" characters.
if (e.text < 32 || e.text > 126)
return true;
// Convert keycode into a (1 char) string.
string k;
k = static_cast<char>(e.text);
mGUI->injectKey(k, mouseX, mouseY);
return true;
}See here:

But in "KeyPressed" it is correct, so I made a "int" saved the "e.text" value in it and used in the "KeyReleased" function (quite onortodox I think).
And another problem, it's more of an betaGUI prob.
I created a TextInput like this:
Code: Select all
mGUI_InputText = mGUI_InputWindow->createTextInput(Vector4(6,72,80,22),"bgui.textinput","",80);While when I change in the "createTextInput" function the string "" to "some text" (so not empty), it does work... How do I fix it?

