Comment 27 for bug 261721

Revision history for this message
Graham Whelan (gawhelan) wrote : Re: X never sees brightness key release events

Mario Limonciello wrote:
> I think that you need to look a little closer at what's actually
> happening for these "Release" events possibly. Try starting a Failsafe
> Terminal at your login screen. If you run xev over there, you'll see
> that a KeyRelease event is somehow generated, however it is *followed*
> by the KeyPress event. The two being out of order may be confusing
> gnome's keyboard handler and gnome power manager.

I can confirm this. Running xev from a failsafe terminal shows a KeyRelease event being generated before the KeyPress. Both are generated when the key is pressed down and no event is generated when the key is physically released.

$ xev

...

MotionNotify event, serial 23, synthetic NO, window 0x400001,
    root 0x13b, subw 0x0, time 1128533, (120,116), root:(122,118),
    state 0x0, is_hint 0, same_screen YES

KeyRelease event, serial 23, synthetic NO, window 0x400001,
    root 0x13b, subw 0x0, time 1129930, (120,116), root:(122,118),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 23, synthetic NO, window 0x400001,
    root 0x13b, subw 0x0, time 1129930, (120,116), root:(122,118),
    state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

MotionNotify event, serial 26, synthetic NO, window 0x400001,
    root 0x13b, subw 0x0, time 1132703, (136,128), root:(138,130),
    state 0x0, is_hint 0, same_screen YES

...