Ogre+CEGUI+OIS and unicode input

Problems building or running the engine, queries about how to use features etc.
Post Reply
xyysnybzi
Gnoblar
Posts: 1
Joined: Sun Nov 09, 2014 8:13 am

Ogre+CEGUI+OIS and unicode input

Post by xyysnybzi »

How can i get the unicode input with OIS and pass them to cegui then show a unicode string, when press one key, only receive an ascii code.
Thanks.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1280
Contact:

Re: Ogre+CEGUI+OIS and unicode input

Post by dark_sylinc »

OIS works at a very low level by directly getting the raw keyboard's keycode signal.

Interpreting "unicode" from key presses is specific to the keyboard layout. You may as well look for a library (or OS functions) that does this job for you because it can be very tedious, or look for a higher level input library system. SDL may have something.

For example in the Latinamerican-Spanish keyboard layout, to get the letter á I first need to press the key next to the P, then the A.
But in the Spain-Spanish keyboard layout, to get the letter á, I need to press the key next to the Ñ, which is next to the L; then the A.
When I hit the Ñ button, OIS reports a symbol (this symbol is somewhere else in my layout).
Post Reply