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. KeyPress event, serial 25, synthetic NO, window 0x6800001, root 0x3b, subw 0x0, time 149133444, (69,68), root:(821,88), state 0x0, keycode 35 (keysym 0x64, d), same_screen YES, XLookupString gives 1 characters: "d" KeyRelease event, serial 25, synthetic NO, window 0x6800001, root 0x3b, subw 0x0, time 149133487, (69,68), root:(821,88), state 0x0, keycode 35 (keysym 0x64, d), same_screen YES, XLookupString gives 1 characters: "d"