Re: XTestFakeKeyEvent() and key repetition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi .... I am sorry the answer took so long!

>> I've just compiled your code and I get a lot "1" keys pressed dusrng 5
>> seconds, so your code does the job... or do I miss something?
> It generates a key press and five seconds later a key release.
> Nothing more, nothing less. No repetition at all.

OK... I think you have to turn on autorepeat for the key(s). Take a look
at the following man pages:
  XChangeKeyboardControl
  XAutoRepeatOn (and off)


> xev output:
> --8<--
> KeyPress event, serial 27, synthetic NO, window 0x2200001,
>     root 0x89, subw 0x2200002, time 1828774, (37,45), root:(879,585),
>     state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES,
>     XLookupString gives 1 characters:  "1"
>
> KeyRelease event, serial 27, synthetic NO, window 0x2200001,
>     root 0x89, subw 0x2200002, time 1833774, (37,45), root:(879,585),
>     state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES,
>     XLookupString gives 1 characters:  "1"
> --8<--
>
> I probably need to find another function... But it's working for you?
It is!


>> This is how I compiled (on GNU/Linux (Debian) + XFree86 + gcc):
>>    gcc testx.c -o testx -L/usr/X11R6/lib -lXtst -lX11
>>   ./testx
>> and yes, I called your snippet of code testx.c
> Yes, that's how I compile it too.
>
> Thanks for your time!
:)



> */ Christoffer Sawicki <qerub@xxxxxxx>

home.se --> Sweden.... I live in Gothenburg!

> _______________________________________________
> XFree86 mailing list
> XFree86@xxxxxxxxxxx
> http://XFree86.Org/mailman/listinfo/xfree86
>

_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux