9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: miller@hamnavoe.demon.co.uk
To: 9fans@cse.psu.edu
Subject: [9fans] chords for 2-button mice
Date: Sat, 15 Jul 2000 11:27:17 +0100	[thread overview]
Message-ID: <E13DPDu-0007D9-0Y@anchor-post-34.mail.demon.net> (raw)

Plan 9 mouse drivers allow a 2-button mouse to impersonate a 3-button mouse
by interpreting shift + right button as middle button.  However, chords
are a problem because shift + left button + right button is still
interpreted as left button + right button.  The following one-line change
to the kernel causes shift + left button + right button on a ps2 mouse
to be interpreted as left button + middle button, which makes acme and
rio much more comfortable on my mouse-challenged thinkpad.

term% diff /sys/src/9/pc/mouse.c mouse.c
62c62
< 	static uchar b[] = {0, 1, 4, 5, 2, 3, 6, 7, 0, 1, 2, 5, 2, 3, 6, 7 };
---
> 	static uchar b[] = {0, 1, 4, 5, 2, 3, 6, 7, 0, 1, 2, 3, 2, 3, 6, 7 };

I believe the following change does the same for serial mice, but I haven't
tested it:

term% diff /sys/src/9/port/devmouse.c devmouse.c
549c549
< 	static uchar b[] = { 0, 4, 1, 5, 0, 2, 1, 5 };
---
> 	static uchar b[] = { 0, 4, 1, 5, 0, 2, 1, 3 };
589c589
< 	static uchar b[] = {0, 4, 2, 6, 1, 5, 3, 7, 0, 2, 2, 6, 1, 5, 3, 7};
---
> 	static uchar b[] = {0, 4, 2, 6, 1, 5, 3, 7, 0, 2, 2, 6, 1, 3, 3, 7};

(Note to Vita Nuova: I think this is applicable to Inferno as well.)

-- Richard Miller


                 reply	other threads:[~2000-07-15 10:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E13DPDu-0007D9-0Y@anchor-post-34.mail.demon.net \
    --to=miller@hamnavoe.demon.co.uk \
    --cc=9fans@cse.psu.edu \
    /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).