LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: JudoVana on April 10, 2007, 21:37:31

Title: Diacritical strings
Post by: JudoVana on April 10, 2007, 21:37:31
Hell(o)!

I wouldlike to ask how to "get inside an input" with diacritical chars.
Now im using Keyboard.getEventCharacter(); /*or  getKeyname(..)*/ functions. But this do not do what I want.
Thet means i need chars like ěšúůčřžýáíé...(that is from cz layout;),and for example pressed ě returns me char '2' (which is true on eng layout) ) and Greek alphabets and Finland or Norways special charakters...
is it possible?

I have also one more question. This is "out of topic" in lwjgl but is familiar with this question. I'm using nehe lesson 17 to writ text out.  But there is also problem with diacritical charakters. (i have alreday redraw the font texture with right "czechs" charakters, but it sometimes "locked" and returns an rectangles instead of (even english) letters ) have anybody experiences?
Title: Re: Diacritical strings
Post by: JudoVana on April 13, 2007, 18:37:58
Please!!! Really noboody know?
Title: Re: Diacritical strings
Post by: Fool Running on April 15, 2007, 22:31:47
I would think that Keyboard.getEventCharacter() should return the correct character. Can you verify that the windows keyboard is set correctly when you are entering the text (to the cz layout)?

My guess (someone correct me if I'm wrong ;D) is if it is set correctly, the Keyboard is assuming that you have an English keyboard somehow. I've never tried with anything other than English so I don't know.

Your other problem sounds like the Windows keyboard is getting switched to some other keyboard. If you enable the language bar you can see if the keyboard is switching.

Other than that, I'm out of ideas.
Title: Re: Diacritical strings
Post by: Matzon on April 16, 2007, 05:19:37
I think that native characters like æøå are comming out as expected. The problem is dead keys that require multiple keys, like ü é etc.
Title: Re: Diacritical strings
Post by: Jon on April 16, 2007, 08:30:19
Quote from: Matzon on April 16, 2007, 05:19:37
like ü é etc.

That gave me grief, and I still haven't gotten around to fixing it.  :-\
Title: Re: Diacritical strings
Post by: JudoVana on April 23, 2007, 09:00:23
uuuf. I'm sorry for my long absence.

Both-matazon and foolrunning are right. Problems are dead keys;) And even switching keyboard layout. Becouse my windows do not want to switch keyboard layout during the game progress.