Am Dienstag, den 02.10.2007, 18:50 +0200 schrieb Andreas Gick:
> Thanks for the quick answers....
>
> Well there is a similar function in the source of fpgui that I included as
> attachment (at around line 414), and I'm not sure, why it only works with
> ASCII characters.
>
> But maybe I also need to clarify a bit more, what I want to do: At the
> moment,
> I cannot type "ö" into an edit field, because that key isn't mapped, but I
> can assign "ö" to a string variable and display it in the edit field.
When pressing a key the Xserver receives it because it is handling the
input driver. Then an event of type XKeyPressed (or similar named) is
sent to the application having the focus. If you release the key,
XKeyReleased is sent with the key code as data.
When an application is running on X it regularly handles the message
loop and reads the messages received. After discriminating a key event
it will probably translate the key code to a key symbol and forward it
to the control focused, which is the edit box.
So if you compile the code with debug defined you will most likely see
the event getting translated by
function TfpgApplicationImpl.KeySymToKeycode(KeySym: TKeySym): Word;
to a char 'ö'. The question now is: where does it vanish on the way from
the applications decoding to the "setText"-procedure of the edit box.
I don't know anything about fpGUI's internals.
HTH and good luck,
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives