Contribute
Register

New VoodooPS2Controller, Keyboard, Trackpad (ClickPad support)

Status
Not open for further replies.

RehabMan

Moderator
Joined
May 2, 2012
Messages
181,111
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
For those of you with Synaptics ClickPads

Note: I should also mention that this kext should work well for any modern Synaptics touchpad. It is just that the new feature is ClickPad support. But I've been working on improving this driver for normal Synaptics pads for quite a while.

I know there is some Lenovo/Sony laptops that have Synaptics ClickPad...

I've been doing some implementing of "extended w mode" specifically to support ClickPads like yours. Maybe you could give it a try and see how it works. Here is what's implemented:

- If you touch the trackpad with your other finger while holding the "pad button" down with the first finger, it will track the secondary finger using extended w mode secondary finger packets.

- If you have your first finger tracking (not depressing the button), you can still click the "pad button" anywhere on the pad. Most areas are left clicks, except for the "right button area." I use the secondary finger packet information to determine where that secondary finger is touching (for right/left determination).

- Basic clicking is supported by the "pad button." Left clicks in most areas of the pad, and right click in the right button area.

- Two fingers down and pressing the "pad button" should register a right click. It depends on timing though... you must depress the "pad button" within the double click time from first touch on the pad.

If you have the desire and the ability to build this version and have one of these clickpads, give it a try and let me know how it goes...

Sources & installation instructions are here: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller

Instructions for building:
- Install xcode, if you don't have it already
- Download or 'git clone' the code from my github repo
- Open the VoodooPS2Controller.xcodeproj
- Select the "All > My Mac 64-bit" scheme
- Choose Product -> Build
- Select the VoodooPS2Controller.kext in the Products folder from the project viewer on the left side
- Choose File -> Show In Finder

Edit: I decided to provide a build -- see the attachment below. Give it a try and please report back. Thanks!

Edit: 2013-0127. Provided new build. Fixed issue with secondary packets with non-touch Z. Please try it.

Edit: 2013-0129. New build. This time some fixes for logic in right-click. Please try and report back.

Edit: 2013-0207. New build (v1.7.12). This version has some changed logic for tracking the secondary fingers. In order to fix difficulties that birkley was having with his trackpad both fingers are tracked simultaneously. This can be turned on/off in the Info.plist: setting ClickPadTrackBoth (default is Yes). This version also has a lot of other changes for stability at startup and wake from sleep. It is the same version distributed in the ProBook forum, but without the special keyboard mappings and higher FingerZ. Please test and provide feedback.

Edit: 2013-0210. New build to fix problem with keyboard controller returning 0xFA from 0xEE (Test Keyboard Echo) command. Now allow proper response (0xEE) and 0xFA.

Edit: 2013-0215: In addition to 0xFA being allowed, now allowing 0x00. Considering just removing this test completely in future builds...

Edit: 2013-0218: See github README.md for details on the changes. This is just bug fixes and re-written interrupt/data handling. Big changes here, hopefully more stable not less. I leave the older version just in case.

Edit: 2013-0221a (replaces 0220 and 0221): See github README.md for some details on the changes. Fixes startup issues (hopefully) and perhaps some of the "key repeats forever" issues. Also adds a new feature "Breakless PS2" for those with keyboards that have keys (Fn+fkeys mostly) that do not generate break codes. This 'a' release fixes the 'breakless' feature and adds support for passthru middle button/scrolling.

Edit: 2013-0225: See github README.md for details on the changes. Mostly these are bug fixes to "pass through" functionality discussed/debugged/tested by 'crimsonmac'.

Edit: 2013-0226: New build 1.7.17. This one fixes a problem with the Debug build (KP on startup), due to a bug in OS X IOMallocAligned.

Edit: 2013-0304: New build 1.8.0. See README.md. Mostly fixes for Snow Leopard and now uses motherboard ID from FakeSMC to find configuration data. If you have customized the keyboard layout for your specific laptop, please submit your Info.plist changes, and I will integrate the changes into the next version of the driver.

New Release 2013-03-15 Version 1.8.1. Mostly a bug fix release with a couple of new features. Also, it has been optimized a bit (so it is smaller, with less symbols exported to the kernel). See the change log for more details.

See this post for more information on 1.8.0 release: http://www.tonymacx86.com/hp-proboo...ntroller-keyboard-trackpad-95.html#post562005

New Download Link at Google Code: https://code.google.com/p/os-x-voodoo-ps2-controller/
 
Hi

I have been using version 1.7.7 of your VoodooPS2Controller and find it to be the best thing out there for my HP Envy 17t-3200. I am looking forward to your release of 1.7.8 and will be glad to test it out for you and provide feedback. If it's not too late to request something, however, I would like the ability to map the keyboard better to the buttons I have rather than the ones on the HP Probook. For example, I have a scroll wheel for volume control and a mute button that both work with the official version of the VoodooPS2Controller but not with yours. Also, my function keys are not the same as those on the Probook. It seems like you made changes to the official version and put your name inside the .plist and other places so I can't just swap your keyboard kext for the official one. Some interchangeability would be appreciated. The rest of your work is GREATLY appreciated. Thanks.

Probably all you need to do is remove the keyboard remapping that was done for Probook (we swap Fn+fkeys for fkeys). If you read the wiki article on keyboard remapping, you will see it is a simple edit to the Info.plist.

https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller/wiki/How-to-Use-Custom-Keyboard-Mapping

Getting the Fn+fkeys to work for the various media functions is always going to require tweaks to the keyboard Info.plist. This is because the scan codes for these media functions like volume/brightness is not standardized. That lack of standardization is why I wrote the code to allow remapping of the keyboard from the Info.plist -- as having these things hardcoded in the binary was not the right way.

I do think that the next build will be released with the Fn+fkeys not swapped. We can already easily do (or undo) this mapping for Probook users in the Probook installer.
 
I decided to provide a build. Attached in first post...
 
Congratulations on your new build. You have made tremendous progress. Not only do the keyboard buttons work as you said they would above, but you have gotten left and right trackpad buttons to work.

Try also to right click by depressing your "pad button" with two fingers. Let me know how that goes. It has to be a quick touch+press. That is, if you touch first, then later press the "pad button" it will not count as a right click (just left). A quick natural touch+press with two fingers (slightly separated) should work. I'm curious because this feature I definitely cannot test for easily. Right now it is tied to double click time, and I'd like to get an idea of what the right default time should be.

It should also be possible to "click" the buttons with the "pad button" while you have one finger on the trackpad. For example, use one finger to move your pointer to a location you wish to click on... then leave your finger resting there. Use a second finger to press and click the "pad button." Either right or left click should work depending on where you press.

I can now select something with the left button and the right button opens a context menu. Scrolling is now much faster but I was able to adjust it to my liking using the trackpad preference pane.

Scrolling "speed" in this release should be about the same as the last. What is new is "momentum" scroll... where the scroll continues after releasing... then fades.

The cursor jumps around a bit but its not too bad and I think that may just be the Synaptics Clickpad because it does this in Windows too.

It would be interesting to see your startup debug output (need debug version of the driver). You should find it in Console system.log (filter for 'voodoo').

The recent ClickPads I've used at the store have been quite responsive, but I wonder if yours is an older one.

One thing that did not work for me is dragging. When I left click on an object and try to drag it, the object drops down to the dock and I cannot move it from there. When I release the left button, it returns to its original location. Dragging still works by double-clicking on an object and moving it, but it's hard to cross the entire screen that way. I really notice this when I am playing full-screen solitaire and need to move cards all the way from one side of the screen to the other.

There are a couple ways to drag using the "pad button." First is with one finger. It would be good to verify that works first. To do so, move your pointer to object you want to drag, then click the "pad button" and hold. While still holding, move the object with your finger. Release when you're done dragging. Hopefully at least that much works.

The next way is what I'm hoping to get working and it involves multitouch (main point of this test release). In this case, you move the pointer to the object you want to drag. Then you can press the "pad button" anywhere but the right-click area and hold. Then with a second finger, move the pointer to where you want the object. Release the "pad button" when you're done. Try dragging both objects, selections, and windows (windows are pretty safe to drag around, you know you're not going to do something you regret). This probably still needs work, as I can only test in a very gimped way, given I don't have the ClickPad version. I'm thinking of getting one of these Lenovo laptops in spring, but that is not for a while.

Third way is with double-tap-hold. This doesn't involve the "pad button." Tap on the pad as if you were going to double click, but on the second tap, hold (light touch, not necessary to click the pad). In addition (new feature this version), you can temporarily invoke "drag lock" by holding down Command (configurable in Info.plist DragLockTempMask) when you do the double-tap-hold. For that drag only, it acts like you have drag-lock enabled. Very useful for dragging longer distances. A single tap gets you out of "drag-lock" and the object drops where you have it. These methods only work if you have clicking + dragging enabled in Trackpad Prefs.

Typing feels very comfortable and much more controlled than in the last build. The cursor seems to be staying where it's supposed to be. I'll continue to use it and, if I notice any more details about its performance, I'll post it here. Thanks.

Thanks.

Edit: Updated information on DragLockTempMask
 
Two more things, I found that I really messed stuff up when I tried to adjust the settings in the VoodooPS2 Preference Pane. Everything went back to the way it was when I restore those settings to where they had been originally. Next, I installed the release version of the kext and daemon.

The preference pane is not ready for prime-time. That's why I didn't include it in my build. It is pretty buggy and almost useless. I haven't done much with it, except to make sure it continues to build. But I do plan to work on it in the future. I take it you are doing your own build?

The daemon is good to go. All it does is watch for USB mice being connected and disconnected, so it can enable/disable the trackpad automatically if you have the setting for this option set in System Prefs -> Accessibility -> Mouse & Trackpad (you will see the option there).

Would it be more helpful to you for me to use the debug versions? Let me know. BTW - I do have a genuine

Debug output from startup would be a good start. There is also some dumping of the secondary finger packets as they are delivered, which might be useful in debugging some of the multi-touch scenarios.

Synaptic Clickpad so my readings would reflect an actual clickpad as opposed to a simulated one. I don't know how much difference that would make but I thought I'd put it out there.

It makes a huge difference to get results from an actual device. Like I said, I can only go so far with mine...
 
This does not work. The object/window/selection being dragged drops down to the dock. I can get it to move along the bottom of the screen but once it reaches the bottom left corner, it won't move in any direction. When I release it, it goes back to its original position. This happens whether I have sort by name set in my desktop view options or not.

If you're up to it, going to need some debug output to start... First up is the startup debug output because it shows information about your touchpad. I wonder what firmware it has and it would be interesting to see the rest of the properties too.

Once I enabled drag-lock in trackpad preferences, this worked just fine. However, it did not work when I used the Ctrl key. Using the Ctrl key only brought up the context menu.

Bad choice of a modifier key by me, I suppose. It is easy to forget that I'm using KeyRemap4MacBook to make this behave more like a PC. I consider Apple's decision to launch context menus with the Control+leftclick to be brain dead (that's what the right button is for!), so I use KeyRemap4MacBook to swap Control+leftclick for Command+leftclick. This allows me to open links in new tabs in Chrome with Control+leftclick. So, on my system Control works just fine for this purpose.

Bottom line: I'm going to have to make this configurable in the Info.plist.
 
Here's the data regarding PS2 in my kernel.log:

I need the output from the debug version. At least I know you have firmware 8.1 which is typical of the ClickPads...

And when you go into multi-touch (ie. two fingers) you will see extra info about the packets coming in from the debug version. A useful debug packet dump would be:

- mark your spot in the debug output (ie. so you know when to start copy/paste)
- use two fingers on the trackpad (ie. multitouch drag) and with the second finger, drag very consistently left -> right, trying to stay at the same position with respect to up/down (attempt to get packet dump of x moving left to right)
- same thing as above but, drag very consistently bottom -> top, trying to stay at the same position with respect to left/right (attempt to get packet dump of y moving bottom to top)

Let me know what else you need. BTW - I seemed to be able to drag with the debug version of the kext slightly better than with the release version. Who knows why. This pertains to dragging with the trackpad button depressed and moving the object with one finger on the trackpad.

Weird, but what you describe (I think) is not 'one finger'... it is two (one finger is on the pad holding the button down, and the second one is moving). Just to get our terminology correct: two finger is if any two fingers are touching the pad. One finger is only one finger touching the pad.

The object still went to the bottom of the screen but eventually I could get it to move up from the bottom left corner and move it around. However, when I tried to release the object into a window, it did not move/copy but went back to its original location.

Something must be wrong with my code (perhaps because documentation is wrong). Hopefully somebody with this trackpad and some coding experience can pick up what I did and run with it.

Meantime, I'll stare at the code some more...
 
OK, I'm pushing the envelope of my knowledge when it comes to isolating debug info in my log files. Which log should I use to provide you with the info you need? It seems like the log info changes as I am trying to copy it. I assume that's because I'm using the trackpad to copy the info from the log. It makes it confusing. However, I see tons of PS2 entries in my log files now. I'm assuming that is because I am using the debug version.

It is in kernel.log. Best to use USB mouse to copy data out of the log because otherwise you lose track of what you're trying to copy. Also a good idea to let the system settle after booting, so all the background startup tasks are done writing to the log.

You can also filter for what you're looking for. 'voodoo' for example... or 'secondary finger'

Is this with your build or mine? If yours you can also turn on/off various logs in the code, depending on what you want to focus on. If debugging this is beyond your level, I understand...

It might have to wait until I can have hardware to test with... Or we bump into a dev that can take what I started and finish it...
 
I uploaded a new build. Please give it a try and report back. For new build, please visit original post.

Thanks!
 
I've installed the new build. I can already see that you have made progress in terms of two-finger dragging. It is still not quite right but much, much better. I will try to give you some decent log info tomorrow. This is such a vast improvement from the November build. I hope others will appreciate it as much I as do.

How is your trackpad as far as consistency during two-finger drag? By consistency, I mean as you move across or up and down, is it consistent as far as movement on screen as it relates to physical finger position. Is there hope for it?

Hopefully your trackpad is much better at two finger input than is the Probook. There are serious problems with the Probook Synaptics Trackpad. Somewhat hard to explain, but especially along the Y-axis it tends to "get stuck" (that is you're moving along the y, but the packets don't reflect it) and there tends to be large jumps at certain points (usually near the Y position of the other finger). In addition, packets for each finger are affected by the other. Again, a bit hard to explain, but on the Probook trackpad, if you move the primary finger while the driver is tracking the secondary, it affects the secondary data. And same thing the other way around.

In short, the Probook trackpad is hopeless when it comes to multitouch. At least I don't have to worry about implementing a true multi-touch driver for the Probook, because unless there is some secret way to initialize the trackpad to allow for accurate multitouch data, there is no point.

Hopefully yours is better...
 
Status
Not open for further replies.
Back
Top