From owner-freebsd-mobile Mon Jan 14 14:34:22 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from vaio.aviaport.ru (dialup-h.aviaport.ru [217.69.199.239]) by hub.freebsd.org (Postfix) with ESMTP id A4BE137B404 for ; Mon, 14 Jan 2002 14:34:16 -0800 (PST) Received: by vaio.aviaport.ru (Postfix, from userid 1001) id 407CBE2B1B; Tue, 15 Jan 2002 01:34:08 +0300 (MSK) Date: Tue, 15 Jan 2002 01:34:08 +0300 From: Juriy Goloveshkin To: freebsd-mobile@freebsd.org Subject: vaio's jogdial & moused Message-ID: <20020114223408.GA4272@aviaport.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline User-Agent: Mutt/1.3.25i Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I made a little hack for moused to use jogdial like a wheel. maybe it will be useful for somebody who use /dev/sysmouse in X. to use it, run "moused -t jogdial -p /dev/jogdial" -- bye Juriy Goloveshkin --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=diff diff -ruN /usr/src/sys/sys/mouse.h.orig /usr/src/sys/sys/mouse.h --- /usr/src/sys/sys/mouse.h.orig Thu Jul 5 19:38:36 2001 +++ /usr/src/sys/sys/mouse.h Tue Jan 15 01:18:39 2002 @@ -158,6 +158,7 @@ #define MOUSE_PROTO_X10MOUSEREM 13 /* X10 MouseRemote, 3 bytes */ #define MOUSE_PROTO_KIDSPAD 14 /* Genius Kidspad */ #define MOUSE_PROTO_VERSAPAD 15 /* Interlink VersaPad, 6 bytes */ +#define MOUSE_PROTO_JOGDIAL 16 /* Vaio's JogDial */ #define MOUSE_RES_UNKNOWN (-1) #define MOUSE_RES_DEFAULT 0 diff -ruN /usr/src/usr.sbin/moused.orig/moused.c /usr/src/usr.sbin/moused/moused.c --- /usr/src/usr.sbin/moused.orig/moused.c Wed Aug 29 00:22:14 2001 +++ /usr/src/usr.sbin/moused/moused.c Tue Jan 15 01:13:50 2002 @@ -200,6 +200,8 @@ "sysmouse", "x10mouseremote", "kidspad", + "foo", // hmmm... + "jogdial", #if notyet "mariqua", #endif @@ -362,6 +364,7 @@ (CS7 | CREAD | CLOCAL | HUPCL ), /* X10 MouseRemote */ (CS8 | PARENB | PARODD | CREAD | CLOCAL | HUPCL ), /* kidspad etc. */ (CS8 | CREAD | CLOCAL | HUPCL ), /* VersaPad */ + 0, /* JogDial */ #if notyet (CS8 | CSTOPB | CREAD | CLOCAL | HUPCL ), /* Mariqua */ #endif @@ -1082,6 +1085,7 @@ { 0x40, 0x40, 0x40, 0x00, 3, ~0x23, 0x00 }, /* X10 MouseRem */ { 0x80, 0x80, 0x00, 0x00, 5, 0x00, 0xff }, /* KIDSPAD */ { 0xc3, 0xc0, 0x00, 0x00, 6, 0x00, 0xff }, /* VersaPad */ + { 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0xff }, /* JogDial */ #if notyet { 0xf8, 0x80, 0x00, 0x00, 5, ~0x2f, 0x10 }, /* Mariqua */ #endif @@ -1361,6 +1365,8 @@ } break; + case MOUSE_PROTO_JOGDIAL: + break; case MOUSE_PROTO_MSC: setmousespeed(1200, rodent.baudrate, rodentcflags[rodent.rtype]); if (rodent.flags & ClearDTR) { @@ -1618,6 +1624,8 @@ */ break; #endif /* notyet */ + case MOUSE_PROTO_JOGDIAL: + break; /* * IntelliMouse, NetMouse (including NetMouse Pro) and Mie Mouse @@ -1716,7 +1724,18 @@ act->dx = (char)(pBuf[1]) + (char)(pBuf[3]); act->dy = - ((char)(pBuf[2]) + (char)(pBuf[4])); break; - + + case MOUSE_PROTO_JOGDIAL: /* JogDial */ + if (rBuf == 0x6c) + act->dz=-1; + if (rBuf == 0x72) + act->dz=1; + if (rBuf == 0x64) + act->button = MOUSE_BUTTON1DOWN; + if (rBuf == 0x75) + act->button = 0; + break; + case MOUSE_PROTO_HITTAB: /* MM HitTablet */ act->button = butmaphit[pBuf[0] & 0x07]; act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; --6TrnltStXW4iwmi0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message