9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Middle button on usb mice
Date: Wed, 28 Sep 2016 16:20:41 +0200	[thread overview]
Message-ID: <e0446eba41a5c6390f9bd7d2b6986197@felloff.net> (raw)
In-Reply-To: <20160928021342.GA2003@speakerbox>

in fact, you might try this (untested):

diff -r 38db1b2cd29e sys/src/cmd/nusb/kb/kb.c
--- a/sys/src/cmd/nusb/kb/kb.c	Thu Sep 22 11:04:43 2016 +0200
+++ b/sys/src/cmd/nusb/kb/kb.c	Wed Sep 28 16:20:13 2016 +0200
@@ -234,8 +234,7 @@
 					for(i=l[UsagMin]; i<=l[UsagMax] && l[UsgCnt] < Nu; i++)
 						l[Nl + l[UsgCnt]++] = i;
 				for(i=0; i<g[RepCnt]; i++){
-					if(i < l[UsgCnt])
-						l[Usage] = l[Nl + i];
+					l[Usage] = i < l[UsgCnt] ? l[Nl + i] : 0;
 					(*f)(t, v, g, l, c, a);
 				}
 				break;

--
cinap


  parent reply	other threads:[~2016-09-28 14:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-24  3:26 lemon
2016-09-24 13:03 ` [9front] " cinap_lenrek
2016-09-26 23:13   ` lemon
2016-09-26 23:30     ` cinap_lenrek
2016-09-28  2:13       ` lemon
2016-09-28 13:27         ` cinap_lenrek
2016-09-28 14:20         ` cinap_lenrek [this message]
2016-09-30  3:47           ` lemon
2016-09-30  6:41             ` cinap_lenrek
2016-10-18  0:46               ` lemon
2016-09-30  7:37             ` cinap_lenrek
2016-09-30  7:40               ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0446eba41a5c6390f9bd7d2b6986197@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).