jbensmann / xmouseless

A fast and simple way to control the mouse.
GNU General Public License v3.0
147 stars 26 forks source link

'p' for scroll up doesn't work, but another keybind does #5

Closed Flurrywinde closed 2 years ago

Flurrywinde commented 3 years ago

I noticed 'p' for scroll up wasn't working, so I recompiled with the below change:

static ScrollBinding scroll_bindings[] = {
    /* key        x      y */
    { XK_n,        0 ,    25 },
    { XK_p,        0 ,   -25 },
    { XK_t,        0 ,   -25 },
...

Now, 't' will scroll up, but 'p' still doesn't.

jbensmann commented 2 years ago

Thanks for creating the issue, that is really strange, I have had similar problems that some combinations of two keys did not work on some installations (e.g. moving up und right), but not that a single key does not work at all. There is also an issue that the scroll bindings don't work on the first key press, but only after the second one. Can you double check that p does not work even when pressing a second time?

Flurrywinde commented 2 years ago

The 'p' key for scroll up works now. How strange! It consistently didn't work for a long time, but both today and yesterday, it worked (with a reboot in between). I didn't change anything, just have kept both 'p' and '[' as scroll up. Scrolling still only happens after the second press, though. Any idea what's causing this? It makes me wonder if it has to do with a recent Arch update.

jbensmann commented 2 years ago

Very strange, but good that it works now, let me know when this happens again. With the scrolling only working after the second press, it has always been like this, I suppose it has something to do with the active window losing focus when xmouseless starts, so that one has to click or scroll on it once, I will probably look into it some day.

jbensmann commented 2 years ago

Scroll bindings should work on first press now, I added a workaround that produces an additional scroll event directly after a scroll key is pressed, though I still do not know why this workaround is needed.