On Sun, 13 Oct 2024 01:32:03 +0200,
Kirill A. Korinsky <kir...@korins.ky> wrote:
> 
> I had discovered that the same problem was fixed in NetBSD in 2009:
> https://github.com/NetBSD/src/commit/edeb84e77a4277c9cc1470db7c51460adee28854.
> 
> So, I have included their changes in the diff below. This version fixes the
> Prtc button on my USB keyboard, and also fixes a bug with the mute button on
> the embedded keyboard. The bug: when I press it, it feels that it emmits
> more than one event (I never had dig into it), which leads to switching mute
> ON -> OFF -> ON in the loop, which was a bit irrotected.
>

After a few iteration of testing, the second chunk is unrelated.

With and without it push a button mute leads to two events:

    KeymapNotify event, serial 28, synthetic NO, window 0x0,
        keys:  29  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
               0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   0   

    KeymapNotify event, serial 28, synthetic NO, window 0x0,
        keys:  29  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
               0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   0   

    KeyRelease event, serial 28, synthetic NO, window 0xe00001,
        root 0x61d, subw 0x0, time 59780, (1499,955), root:(1500,1000),
        state 0x0, keycode 160 (keysym 0x1008ff12, XF86AudioMute), same_screen 
YES,
        XLookupString gives 0 bytes: 
        XFilterEvent returns: False

if I keep it pushed longer, number of events increased, yes.

-- 
wbr, Kirill

Reply via email to