From owner-freebsd-mobile Wed Feb 6 4:28:59 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from vaio.aviaport.ru (vaio.aviaport.ru [217.69.199.242]) by hub.freebsd.org (Postfix) with ESMTP id 0FEBE37B405 for ; Wed, 6 Feb 2002 04:28:51 -0800 (PST) Received: by vaio.aviaport.ru (Postfix, from userid 1001) id 3F26CE2B91; Wed, 6 Feb 2002 15:28:46 +0300 (MSK) Date: Wed, 6 Feb 2002 15:28:45 +0300 From: Juriy Goloveshkin To: Will Andrews Cc: Jerry A! , Akira Funahashi , freebsd-mobile@freebsd.org Subject: Re: vaio's jogdial & moused Message-ID: <20020206122845.GA57922@aviaport.ru> References: <20020114223408.GA4272@aviaport.ru> <20020205.202905.71116296.funa@funa.org> <20020205175018.GA327@nomad.thehutt.org> <20020205190419.GM82640@squall.waterspout.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020205190419.GM82640@squall.waterspout.com> User-Agent: Mutt/1.3.27i 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 On Tue, Feb 05, 2002 at 02:04:19PM -0500, Will Andrews wrote: > > Anyway, thanks for getting this working. I hope this information is > > useful to other -stable users with VAIOs. > I've agreed to work with nsayer to get these updates added to > -CURRENT and later MFC'd. Watch this space for updates... > I have a Sony Vaio Superslim R505JL. Are you planning to commit moused patch too? Or I have to do send-pr? Actualy, it has a bad c-style ;) 1)I rewrote one 'if' to 'switch' 2)You may ask about string with <<"foo", // hmmm... >> may be "foo" needs to replase with "versapad"... anyway the final moused-patch for CURRECT is: 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,25 @@ act->dx = (char)(pBuf[1]) + (char)(pBuf[3]); act->dy = - ((char)(pBuf[2]) + (char)(pBuf[4])); break; - + + case MOUSE_PROTO_JOGDIAL: /* JogDial */ + switch (rBuf) + { + case 0x6c: + act->dz=-1; + break; + case 0x72: + act->dz=1; + break; + case 0x64: + act->button = MOUSE_BUTTON1DOWN; + break; + case 0x75: + act->button = 0; + break; + } + break; + case MOUSE_PROTO_HITTAB: /* MM HitTablet */ act->button = butmaphit[pBuf[0] & 0x07]; act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1]; -- bye Juriy Goloveshkin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message