Jump to content

Refined ALPS TouchPad driver


Dr. Hurt

Recommended Posts

I have a V7 (on my dell e5450) and i can code with c++. can you give some documentation (or some articles, blog posts or anything like that) that help me port the kext.

Sorry for my bad english

 

Official Documentation:

https://www.kernel.org/doc/Documentation/input/alps.txt

 

Source:

Mac: https://github.com/DrHurt/OS-X-ALPS-DRIVER/tree/Release-5/Release%205/VoodooPS2Trackpad

Linux: https://github.com/torvalds/linux/blob/aeaa881f9b17823028b464893b89c42db797b717/drivers/input/mouse/alps.c

 

My summary:

- My code already has almost everything ready. Use V1-V5 as examples and copy V7 from Linux).You'll only need to edit alps.c and alps.h

 

How the driver works:

 

Identify --> setDefaults --> hwInitV3,4,5,7 --> Decode --> Process --> Dispatch

 

Identify: matches E7 and EC and decides which protocol to use

setDefaults: based on the decided protocol, it sets which init, decode, process to use

hwInit: powers on the hw. Touchpad starts sending data when touched.

Decode: converts the raw packet into x, y, pressure, fingers,... (integers)

Process: decides if packet is trackstick or touchpad and sends it to the corresponding function. processes the decoded data and dispatches (send) it.

Dispatch: dispatchEventsWithInfo(f.mt[0].x, f.mt[0].y, f.pressure, fingers, buttons); <-  Nothing for us after that

 

You also must copy packet filtering from process_byte in Linux to Interruptoccured in Mac.

 

You might need to port other V7 specific function for it work properly.

V7 is much more advanced that V1-V5. Its a true multitouch device.

 

Good Luck :)

  • Like 1
Link to comment
Share on other sites

The gray windows is a known issue on Sierra, but not for El Capitan. Replace the trackpad pane from 10.11.6 or older if you're running Sierra.

Once that's enabled, you could set in preference to enable clicking and dragging.

Thanks for the tip, I replaced the file and now it's showing, but now the settings always reset at every restart...

 

I read about setting the LaunchDaemon to check the boxes I need at every start, but there is a way the prefpane saves it without using workarounds?

Link to comment
Share on other sites

Thanks for the great work.

 

I install R5 and it works fine except some issues:

 

1. When system boots,  the touchpad click works fine at the login screen, but stops working after logging. I need to open trackpad panel and close it so touchpad  click will start working again. Is there anything I can do to fix this?

 

2. Some keys of keyboard not working like command, option so I can't use the shortcut keys.

 

3. Is any variable in the info.plist I can change its value to reduce side scrolling speed so it won't be too fast?  

 

4. How can I know the version of my ALPS touchpad?

 

Thanks for the help.

Link to comment
Share on other sites

  • Moderators

Thanks for the tip, I replaced the file and now it's showing, but now the settings always reset at every restart...

 

I read about setting the LaunchDaemon to check the boxes I need at every start, but there is a way the prefpane saves it without using workarounds?

Use Dr. Hurt's app here

  • Like 1
Link to comment
Share on other sites

Update some finding:

 

 

1. When system boots,  the touchpad click works fine at the login screen, but stops working after logging. I need to open trackpad panel and close it so touchpad  click will start working again. Is there anything I can do to fix this? 

-->As post #326 said, use Dr. Hurt's app to solve this.

 

2. Some keys of keyboard not working like command, option so I can't use the shortcut keys.

-->change "Use ISO layout keyboard" in info.plist to "false"

 

3. Is any variable in the info.plist I can change its value to reduce side scrolling speed so it won't be too fast?

-->no finding yet

 

4. How can I know the version of my ALPS touchpad?

-->Still don't know what version it is but it's not that important now.

Link to comment
Share on other sites

Update some finding:

 

 

1. When system boots,  the touchpad click works fine at the login screen, but stops working after logging. I need to open trackpad panel and close it so touchpad  click will start working again. Is there anything I can do to fix this? 

-->As post #326 said, use Dr. Hurt's app to solve this.

 

2. Some keys of keyboard not working like command, option so I can't use the shortcut keys.

-->change "Use ISO layout keyboard" in info.plist to "false"

 

3. Is any variable in the info.plist I can change its value to reduce side scrolling speed so it won't be too fast?

-->no finding yet

 

4. How can I know the version of my ALPS touchpad?

-->Still don't know what version it is but it's not that important now.

 

3- increase vscrolldivisor 

 

4- boot in verbose and look for ALPS messages

Link to comment
Share on other sites

I've sent you a pull request that adds support for the Alps v7 trackpad :) https://github.com/DrHurt/OS-X-ALPS-DRIVER/pull/2

 

Works fine on my Flex 3-1480 here.

 

Some notes regarding v7:

  • Tracking and Scrolling were very slow originally; I increased the speed in Settings and it's now fine
  • The trackpad can detect up to 5 fingers but only reports 2 touch points. This is a limitation the Linux driver has, so no way around that
  • Two finger scrolling is working quite well
  • Fortunately, 3 finger gestures do work fine. 
  • Are there any 4 finger gestures implemented in dispatchEventsWithInfo? I didn't see any when I was doing 4 finger swipes here....
  • I have a "clickpad" where the entire trackpad is a button, and the "right click" is really just an area of the pad... so right physical click doesn't work (left click only, although 2 finger tap works)
  • There isn't any thumb rejection implemented yet, so this is something that will need to be done for the clickpad...

It does work mostly well, however, and the issues aren't too major and are fixable.

  • Like 1
Link to comment
Share on other sites

I've sent you a pull request that adds support for the Alps v7 trackpad :) https://github.com/DrHurt/OS-X-ALPS-DRIVER/pull/2

 

Works fine on my Flex 3-1480 here.

 

Some notes regarding v7:

  • Tracking and Scrolling were very slow originally; I increased the speed in Settings and it's now fine
  • The trackpad can detect up to 5 fingers but only reports 2 touch points. This is a limitation the Linux driver has, so no way around that
  • Two finger scrolling is working quite well
  • Fortunately, 3 finger gestures do work fine. 
  • Are there any 4 finger gestures implemented in dispatchEventsWithInfo? I didn't see any when I was doing 4 finger swipes here....
  • I have a "clickpad" where the entire trackpad is a button, and the "right click" is really just an area of the pad... so right physical click doesn't work (left click only, although 2 finger tap works)
  • There isn't any thumb rejection implemented yet, so this is something that will need to be done for the clickpad...

It does work mostly well, however, and the issues aren't too major and are fixable.

 

That was faster than I though. You are awesome :D

 

1- I'll fix the speed issue

2- The OS X part of the driver can only handle 2 touch points, so no problem.

3- 4-finger gestures work the same way as 3-finger, but they are not assigned to actions by default. Look at first post.

4- Setting an area for a right click would just add unneeded complexity. Leave it out for now.

5- I don't know what thumb rejection is :/ 

 

ALPS V7 test:

- Merged V7 code by coolstarorg

- Multiply speed by 1.5

 

My next step would be merge/clean up the byte_processing/interrupt handling.. I already did some work on that but have yet to commit changes.

ALPS V7 test.zip

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...