9front - general discussion about 9front
 help / color / mirror / Atom feed
From: "james palmer" <james@biobuf.link>
To: "9front mailing list" <9front@9front.org>
Subject: Re: [9front] enable button 6 in devmouse and kbdfs
Date: Thu, 25 Feb 2021 19:57:10 +0000	[thread overview]
Message-ID: <bd73be40-b512-4cfb-bd98-1b9cb58de8c6@www.fastmail.com> (raw)
In-Reply-To: <a360bac4-e323-447b-933c-e13a65479bcf@www.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

Quoth james@biobuf.link:
> attached is the fixed patch.

or not. sigrid informed me that i broke scrollswap.
yet another revised version attached.
button 6 works and scrollswap works.

- james

[-- Attachment #2.1: Type: text/plain, Size: 335 bytes --]

from postmaster@1ess:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Disposition: attachment;filename="button6.patch"
	Content-Type: text/x-patch; name="button6.patch"
	Content-Transfer-Encoding: BASE64

[-- Attachment #2.2: button6.patch.suspect --]
[-- Type: application/octet-stream, Size: 1312 bytes --]

diff -r b2bea92dffd4 sys/src/9/port/devmouse.c
--- a/sys/src/9/port/devmouse.c	Sat Feb 20 21:02:07 2021 -0800
+++ b/sys/src/9/port/devmouse.c	Thu Feb 25 19:53:04 2021 +0000
@@ -280,6 +280,9 @@
 				b = 16;
 			else if (b == 16)
 				b = 8;
+		/* put button 6 back in */
+		b |=  m.buttons & (4<<3); 
+
 		sprint(buf, "m%11d %11d %11d %11ld ",
 			m.xy.x, m.xy.y, b, m.msec);
 
diff -r b2bea92dffd4 sys/src/cmd/aux/kbdfs/kbdfs.c
--- a/sys/src/cmd/aux/kbdfs/kbdfs.c	Sat Feb 20 21:02:07 2021 -0800
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c	Thu Feb 25 19:53:04 2021 +0000
@@ -626,7 +626,7 @@
 
 	nb = 0;
 	while(recv(keychan, &key) > 0){
-		if(key.r >= Kmouse+1 && key.r <= Kmouse+5){
+		if(key.r >= Kmouse+1 && key.r <= Kmouse+6){
 			if(msinfd >= 0)
 				send(mctlchan, &key);
 			continue;
@@ -859,7 +859,7 @@
 			continue;
 		}
 
-		if(msinfd >= 0 && key.r >= Kmouse+1 && key.r <= Kmouse+5){
+		if(msinfd >= 0 && key.r >= Kmouse+1 && key.r <= Kmouse+6){
 			i = 1<<(key.r-(Kmouse+1));
 			if(key.down)
 				mouseb |= i;
@@ -1226,7 +1226,7 @@
 					r -= 0x40;
 				else
 					goto Badarg;
-			}else if(*lp == 'M' && ('1' <= lp[1] && lp[1] <= '5'))
+			}else if(*lp == 'M' && ('1' <= lp[1] && lp[1] <= '6'))
 				r = Kmouse+lp[1]-'0';
 			else if(*lp>='0' && *lp<='9') /* includes 0x... */
 				r = strtoul(lp, &lp, 0);

  reply	other threads:[~2021-02-25 20:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 18:47 james palmer
2021-02-25 19:32 ` james palmer
2021-02-25 19:57   ` james palmer [this message]
2021-02-25 19:40 ` james palmer

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=bd73be40-b512-4cfb-bd98-1b9cb58de8c6@www.fastmail.com \
    --to=james@biobuf.link \
    --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).