Help - Search - Members - Calendar
Full Version: PS2 Mouse driver for trackpad
Project OS X Forums > Previous Releases > Mac OS X Leopard 10.5 > OS X 10.5 (Leopard) > Hardware Information > Other
Slice
For my Dell Inspiron 1525 no one good Trackpad driver. No 2finger scroll. I tried different solutions so SentelicFSP as VoodooPS2. Nothing.
But stock ApplePS2Mouse works fine with my trackpad, without scroll.
I made simple modification to emulate middle button as scroll.
So
press left then press right then drag.
Enjoy!
Click to view attachment
Additions very simple
CODE
void ApplePS2Mouse::dispatchRelativePointerEventWithPacket(UInt8 * packet,
                                                           UInt32  packetSize)
{
............
  SInt16       dz = 0, dzx = 0;
  AbsoluteTime now;
/*
  if ( (packet[0] & 0x1) ) buttons |= 0x1;  // left button   (bit 0 in packet)
  if ( (packet[0] & 0x2) ) buttons |= 0x2;  // right button  (bit 1 in packet)
  if ( (packet[0] & 0x4) ) buttons |= 0x4;  // middle button (bit 2 in packet)
*/
  dx = ((packet[0] & 0x10) ? 0xffffff00 : 0 ) | packet[1];
  dy = -(((packet[0] & 0x20) ? 0xffffff00 : 0 ) | packet[2]);
    if ( (packet[0] & 0x1) && (packet[0] & 0x2) )
    /* Simulate middle button by pressing left and right button simultaneously */
    {
        buttons |= 0x4;  // middle button
        //Slice middle button = scroll
        dz = dy; dzx = dx;
    }
    else
    {
        if ( (packet[0] & 0x1) ) buttons |= 0x1;  // left button   (bit 0 in packet)
        if ( (packet[0] & 0x2) ) buttons |= 0x2;  // right button  (bit 1 in packet)
    }
    clock_get_uptime((uint64_t *)&now);
    if((dz|dzx)!=0)    /* Do we have any scroll event? if so dispatch it */
    {
        dispatchScrollWheelEvent(dz,dzx,0,now);
    }
    else
        dispatchRelativePointerEvent(dx, dy, buttons, now);

tea
Hi. Do you know where i can download Voodoo PS2 sources?
Thank you!
Slice
QUOTE (tea @ May 24 2010, 09:29 AM) *
Hi. Do you know where i can download Voodoo PS2 sources?
Thank you!

Vorget it!
ApplePS2* sources at Apple.com is fine.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.