Nyran
11-05-2011 21:49:35
Good evening, anyone who's reading this,
I've got a problem and can't manage to solve it, though I read some topics about it.
It is particularly about the OIS::KeyEvent in connection with the MyGUI-AddOn.
I use a keylistener in a MyGUI class, and the overwritten keyReleased function with an OIS::keyEvent reference as parameter.
It looks like this:
But all I get as console output is "0", as if it couldn't convert the keycode. If I use a switch for the e.key statement it is recognized, therefore I can handle Input like
(where m_editEingabe is an MyGUI::Edit object)
, but with this method I can't write special characters like "äöü" or something like that.
I also set the textranslationmode to Unicode for my OIS::Keyboard object, after creating it.
Therefore I would like to know if there's a known and working method to get unicode characters that I can use in the edit field out of the OIS::KeyEvent (or some MyGUI-InputEvent, it doesn't matter, as long as it works).
Thank you for your help. =)
I've got a problem and can't manage to solve it, though I read some topics about it.
It is particularly about the OIS::KeyEvent in connection with the MyGUI-AddOn.
I use a keylistener in a MyGUI class, and the overwritten keyReleased function with an OIS::keyEvent reference as parameter.
It looks like this:
bool MyGUIManager::keyReleased( const OIS::KeyEvent &e )
{
std::cout<<e.text<<"\n";
...
}
But all I get as console output is "0", as if it couldn't convert the keycode. If I use a switch for the e.key statement it is recognized, therefore I can handle Input like
switch(e.key)
{
case OIS::KC_A :m_editEingabe->insertText("a",m_cursorPosition);
break;
case OIS::KC_B : m_editEingabe->insertText("b",m_cursorPosition);
break;
case OIS::KC_C : m_editEingabe->insertText("c",m_cursorPosition);
break;
case OIS::KC_D : m_editEingabe->insertText("d",m_cursorPosition);
break;
(where m_editEingabe is an MyGUI::Edit object)
, but with this method I can't write special characters like "äöü" or something like that.
I also set the textranslationmode to Unicode for my OIS::Keyboard object, after creating it.
Therefore I would like to know if there's a known and working method to get unicode characters that I can use in the edit field out of the OIS::KeyEvent (or some MyGUI-InputEvent, it doesn't matter, as long as it works).
Thank you for your help. =)