Text area doesn't output newlines

Help with integrating libRocket into your engine and game

Text area doesn't output newlines

Postby vdaras on Fri Aug 03, 2012 2:52 pm

Hi guys,

I got a problem with newlines and textarea elements. The newlines aren't received. The code I use to pass key events is this.

Code: Select all
      uint16_t unicode = event.key.keysym.unicode;
      Rocket::Core::Input::KeyIdentifier key = m_keyMap[event.key.keysym.sym];
      if(event.type == SDL_KEYDOWN) {
         m_context->ProcessKeyDown(key, m_keyModState);
         if(unicode >= 32) {
         if(key == Rocket::Core::Input::KI_RETURN) {
            m_context->ProcessTextInput((Rocket::Core::word) '\n');
      } else {
         m_context->ProcessKeyUp(m_keyMap[event.key.keysym.sym], m_keyModState);

Any ideas?
Posts: 2
Joined: Thu Jul 26, 2012 10:50 am

Return to Engine Integration