Am Montag, den 01.10.2007, 12:35 +0200 schrieb Andreas Gick:
> Hi everybody,
> 
> as I want to help out with internationalization of the fpGUI widget set at 
> least for the X-Window system, I need some information on how the keysyms of 
> the X-Window can be translated into characters. 
> 
> For example pressing the german umlaut "รถ" on my german keyboard results 
> according to xev in the keysym $F6, but how is this translated into the 
> actual character on the widgets? Strangely enough, it is possible to display 
> utf-8 text on the widgets the only problem being the keyboard input. 

I think you're looking for something like this:

function FakeDecodeKey(display : PDisplay; key: AnsiString ):TKeyCode;
var
        ks : TKeySym;
        kc : TKeyCode;
begin
        ks := XStringToKeysym(pchar(key));
        kc := XKeySymToKeycode( display, ks );
        result := kc;
end;

In the uses clause where this functions is from there are unit "x" and
"xlib".

Have fun,
Marc


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to