Angus Leeming <[EMAIL PROTECTED]> writes:
| On Tuesday 10 December 2002 3:01 pm, Lars Gullik Bj�nnes wrote:
>> Angus Leeming <[EMAIL PROTECTED]> writes:
>> | On Tuesday 10 December 2002 2:29 pm, Lars Gullik Bj�nnes wrote:
>> >> >> Look at the time difference between the KEYRELEASE and KEYPRESS
>> >> >> events.
>> >> |
>> >> | Why? Ie, I don't understand what you're attempting to do with this
>> >> | code.
>> >>
>> >> Just do it....
>> >>
>> >> KeyRelease event, serial 27, synthetic NO, window 0x4a00001,
>> >> root 0x3a, subw 0x4a00002, time 148348763, (52,23), root:(721,1037),
>> >> state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
>> >> XLookupString gives 1 characters: "d"
>> >>
>> >> KeyPress event, serial 27, synthetic NO, window 0x4a00001,
>> >> root 0x3a, subw 0x4a00002, time 148348763, (52,23), root:(721,1037),
>> >> state 0x0, keycode 40 (keysym 0x64, d), same_screen YES,
>> >> XLookupString gives 1 characters: "d"
>> >>
>> >> What we do not want is cursors, auto-repeat chars that just continue
>> >> to go after the key has been released. so we use xsync for this.
>> >> The problem is to know when to run this xsync, we want to loose as few
>> >> xevents as possible.
>> |
>> | Ok. Here I get a diff of about 40 between events. Now what.
>>
>> Note that I did not ask for the difference between Press and Release,
>> but Release and Press...
>
| Too subtle for me I'm afraid.
>
| KeyRelease event, serial 25, synthetic NO, window 0x6000001,
| root 0x3b, subw 0x0, time 152024603, (67,72), root:(1058,234),
| state 0x0, keycode 35 (keysym 0x64, d), same_screen YES,
| XLookupString gives 1 characters: "d"
>
| KeyPress event, serial 25, synthetic NO, window 0x6000001,
| root 0x3b, subw 0x0, time 152024603, (67,72), root:(1058,234),
| state 0x0, keycode 35 (keysym 0x64, d), same_screen YES,
| XLookupString gives 1 characters: "d"
>
| KeyRelease event, serial 25, synthetic NO, window 0x6000001,
| root 0x3b, subw 0x0, time 152024653, (67,72), root:(1058,234),
| state 0x0, keycode 35 (keysym 0x64, d), same_screen YES,
| XLookupString gives 1 characters: "d"
>
| KeyPress event, serial 25, synthetic NO, window 0x6000001,
| root 0x3b, subw 0x0, time 152024653, (67,72), root:(1058,234),
| state 0x0, keycode 35 (keysym 0x64, d), same_screen YES,
| XLookupString gives 1 characters: "d"
>
| So adjacent Release and Press events have the same time stamp. Next
| step?
this means that you are autorepeating.
--
Lgb