#779450 xbindkeys: Mouse button release event appears to be unreliable when the Super key is held down

Package:
xbindkeys
Source:
xbindkeys
Description:
Associate a combination of keys or mouse buttons with a shell command
Submitter:
Tomas Sandven
Date:
2015-02-28 18:54:06 UTC
Severity:
normal
#779450#5
Date:
2015-02-28 18:52:12 UTC
From:
To:
Dear Maintainer,

I am trying to use xbindkeys to basically map a mouse button to a
keyboard modifier key (Super) so that I can drag windows around without
needing the keyboard. Unfortunately, after a couple of mouse clicks,
xbindkeys fails to execute the mouse release command.

Here is my config:

    "xte 'keydown Super_L'"
      b:10

    "xte 'keyup Super_L'"
      b:10 + Release

And here is the verbose output after a typical session:

    $ xbindkeys -v -n
    displayName = :0.0
    rc file = /home/tomas/.xbindkeysrc
    rc guile file = /home/tomas/.xbindkeysrc.scm
    getting rc guile file /home/tomas/.xbindkeysrc.scm.
    WARNING : /home/tomas/.xbindkeysrc.scm not found or reading not allowed.
    2 keys in /home/tomas/.xbindkeysrc

    min_keycode=8     max_keycode=255 (ie: know keycodes)
    "xte 'keydown Super_L'"
        m:0x0 + b:10   (mouse)
    "xte 'keyup Super_L'"
        Release + m:0x0 + b:10   (mouse)
    starting loop...
    Button press !
    e.xbutton.button=10
    e.xbutton.state=16
    "xte 'keydown Super_L'"
        m:0x0 + b:10   (mouse)
    got screen 0 for window 2bb
    Start program with fork+exec call
    Button release !
    e.xbutton.button=10
    e.xbutton.state=16
    "xte 'keyup Super_L'"
        Release + m:0x0 + b:10   (mouse)
    got screen 0 for window 2bb
    Start program with fork+exec call
    Button press !
    e.xbutton.button=10
    e.xbutton.state=16
    "xte 'keydown Super_L'"
        m:0x0 + b:10   (mouse)
    got screen 0 for window 2bb
    Start program with fork+exec call
    Button release !
    e.xbutton.button=10
    e.xbutton.state=80

As you can see, the first click successfully executed both the press and
release commands, and the second click successfully executed the press
command, but never executed the release command. The Super_L key is now
permanently pressed down, until I press it on the keyboard. As long as
the Super_L key is pressed down, xbindkeys stops working. After I
resolve the stuck key using the keyboard, xbindkeys resumes working for
another couple of clicks until it fails to execute the command again.