[Gambas-user] Couldn't help but laugh, most of you will understand.
Bruce Steers
bsteers4 at gmail.com
Fri Nov 13 20:46:58 CET 2020
> >> and my text editor with the key macro recorder is now GTK only as
> >> gambas Key.Code values only match keysymdef.h defs on GTK not QT.
> >>
> >
> > This is not guarantee to be true all the time. You should really create
> > a conversion function for that, otherwise your program may break in the
> > future!
> >
> > Regards,
> >
>
> Whih may be the reason why Big-B-Brucey's editor/recorder appeared to be
> totally useles when I tried it as I have no gtk libraries installed here.
> Interesting though, I have never had a problem with the Gambas Key
> mappings even though I have several modmaps between the heyboard and the
> gambas layer. Then again I've probably needed Key access in about
> 0..0002% of our code base, which at last count was approaching 500k lines
Yeah i'm having to go back to the drawing board on this.
works perfectly on gtk, all except a left or right control/shift/etc key
always returns the L key not the R
but that was fine.
Then i tried QT and found none of the modifiers give a keysymdef.h code :(
Am currently looking into xlib and the XKeycodeToKeysym function.
But pretty clueless on Extern calls at present.
i tried the proper Key assessor way using Key[symdef] ,
That gets a lot of things working on QT like home/end/pgup/etc but
shift/ctrl/atl keys don't get detected like they do with gtk i'll have to
use the Key.Alt /Key.Shift properties to monitor if down or up on each
press.
I can't believe a simple recorder/playback utility has so many issues.
Sending the keys using X11.SendKey seems to work on both gtk and qt it's
just when it comes to recording them i'm getting the wrong codes on QT.
It's like making a voice recorder that only works for certain languages lol.
In my mind ,, record , playback couldn't be any simpler.
a key has a code , record it , play it back. what that code means or
translates to i think should make no difference at all, if that keys code
is say 12345 then sending back 12345 should be the same key.
god i wish things could be simpler lol.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201113/5a8b6876/attachment.htm>
More information about the User
mailing list