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.
Ogre+CEGUI+OIS and unicode input
- dark_sylinc
- 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
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).
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).