From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3485 invoked from network); 8 Dec 2020 11:38:22 -0000 Received: from ewsd.inri.net (107.191.116.128) by inbox.vuxu.org with ESMTPUTF8; 8 Dec 2020 11:38:22 -0000 Received: from asquith.prosimetrum.com ([125.236.209.157]) by ewsd; Tue Dec 8 06:36:37 -0500 2020 Message-ID: <72DC97BA0FC4F691CD6779E728387B9E@prosimetrum.com> Date: Wed, 09 Dec 2020 00:37:30 +1300 From: umbraticus@prosimetrum.com To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: distributed object-oriented framework pipelining layer Subject: Re: [9front] nusb/kb mouse handling Reply-To: 9front@9front.org Precedence: bulk Thanks to sigrid, who committed the part of the patch that fixes my trackball. We decided to leave the button mapping for the time being. Currently, if a USB mouse has more than three buttons, b4 acts as another b2 and anything above that is ignored. I had suggested instead just sending through b4 and higher as is. This results in b4 and b5 acting as alternatives for the scroll wheel; perhaps a nice side effect for some mice: b |= s->b & ~6 | (s->b & 2) << 1 | (s->b & 4) >> 1; Or perhaps extra buttons should be exposed in case anyone wants to make use of them but not overlap with scroll wheel: b |= s->b & 1 | (s->b & 2) << 1 | (s->b & 4) >> 1 | (s->b & ~7) << 2; The current behaviour was introduced with revison 3acb9fdd26cc nusb/kb: map button 4 to middle button 2 (for logitech 5 button mouse) so I assume someone wanted it. What about b5 though? Perhaps this should be mapped to b3 for some kind of consistency? /* map to mouse buttons */ b |= s->b & 1; if(s->b & (4|8)) b |= 2; - if(s->b & 2) + if(s->b & (2|16)) b |= 4; What do others think should happen to buttons >3? umbraticus