r-c-f / waynergy

A synergy client for Wayland compositors
MIT License
394 stars 17 forks source link

feat: support mouse button 6&7 #82

Closed Sciroccogti closed 1 year ago

Sciroccogti commented 1 year ago

For mouse like Logi MX master3, the two side buttons are Mouse button 6 and Mouse button 7.

This PR simply maps the two buttons to BTN_SIDE and BTN_EXTRA, and fix the issue that xwayland would crash when button 6 or 7 is clicked.

r-c-f commented 1 year ago

I'm curious as to which server is actually sending this, as I've always had the extras mapped back to 4 and 5 instead, and I think they'd actually be dropped by input-leap. Out-of-range buttons should definitely be dropped here as well, but I'll do that in another commit and merge this, as -- while looking a bit weird to repeat the buttons in the default map -- it solves a problem, and can't really create one for anyone else.

Thank you for this and your other recent PR, by the way.

Sciroccogti commented 1 year ago

I'm using https://github.com/pwr-Solaar/Solaar for Logi mouse, but I think the key map is default for the side buttons.

Yes, the issue is actually introduced by the out-of-range buttons which were mapped to strange keycodes. So I also wonder whether more mouse buttons should be supported.

Thank you for your wonderful work and passion!