Re: [AD] X11 keyboard driver missing key up events

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


on Thu, 2011-03-03 at 03:05 +0100, Elias Pschernig wrote:
> If not, try using a while() instead of an if() in your example - there
> can be more than 100 events per second and depending on your kernel
> rest() may wait even longer therefore your example may be limited to
> much less than 100 events per second.

That doesn't seem to be the problem. Here's what I found out: My macbook
keyboard has some hidden key combos that seem to be built into the
hardware, I'm aware of that. For example Fn->Left is home and Fn->Right
is end. Now, if you examine the output I posted closely, you'll see
there ARE KEY_UPs in there, but they're not LEFTs or RIGHTs. What's
happening is if I hold space, press left then right with space held (or
vice versa), then left and right start acting as home/end keys (78 and
79 in the output). It's really weird, I can't see it as being useful in
any way because to do it you have to hold space, creating a big row of
spaces before you can home/end. So maybe we can work around it, I'm just
not sure how, but if it's ok I'll try. Just need to get familiar with
the X keyboard driver and away we go.

> If that doesn't help and ex_keyboard_events has the same problem, maybe
> you can compare with or paste the output of xev for pressing the same
> keys. Does that also show the problem?

xev does show the same behaviour. Here's a rather long sequence where
the only keys I typed were space, left, and right arrows:

KeyPress event, serial 30, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2037434, (274,337), root:(276,448),
    state 0x0, keycode 65 (keysym 0x20, space), same_screen YES,
    XLookupString gives 1 bytes: (20) " "
    XmbLookupString gives 1 bytes: (20) " "
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2037506, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038015, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038015, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038051, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038051, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038097, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038097, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038157, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038157, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038245, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038245, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038306, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038306, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038343, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038343, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038379, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038379, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038434, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038434, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038467, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038467, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038536, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038536, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038615, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038615, (274,337), root:(276,448),
    state 0x0, keycode 114 (keysym 0xff53, Right), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2038635, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039145, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039145, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039178, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039178, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039285, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039285, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039318, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039318, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039430, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039430, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039476, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039476, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039556, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039556, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039804, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039804, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039846, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2039846, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040019, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040019, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040043, (274,337), root:(276,448),
    state 0x0, keycode 110 (keysym 0xff50, Home), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040043, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040556, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040556, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040593, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040593, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040697, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040697, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040733, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040733, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040748, (274,337), root:(276,448),
    state 0x0, keycode 115 (keysym 0xff57, End), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x4c00001,
    root 0x127, subw 0x0, time 2040803, (274,337), root:(276,448),
    state 0x0, keycode 65 (keysym 0x20, space), same_screen YES,

Trent





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/