[NTLK] iPad Pro and Apple Pencil
jake at allaboutjake.com
Fri Nov 13 06:43:54 EST 2015
>Did you have to change any code to make it take full advantage of the
>Pencil (faster scan rate and such)? I haven't looked at the API yet.
The API seems to be pretty rudimentary. Apple seems to be playing tricks with predicting the path of the pencil in order to decrease perceived lag. This results in an API that can go back and update an estimated position with the actual position once its known. Right now, Einstein doesn't look at any of the predicted stuff, and wouldn't really be able to update position once a touch has been sent to the emulator as a pen event.
Based on what I can tell, OS seems to try and do palm rejection. It is very good but its not perfect. If you brush your knuckle lightly it can register as a touch. I don't see a way to detect if a stylus is even present (connected), so the only way you know that the user is using a stylus is when he first touch event comes through with a stylus type.
I added a little bit of test code that will ignore non-stylus touches for 3 seconds after a stylus touch. I have to imagine that there will be better algorithms for this sort of thing, but I haven't played with it too much. This is only really needed to get the 99% palm rejection out to 100% when you're using the stylus.
You do quickly miss the Newton's HWR input for the rest of the OS. I've played with he "WritePad" keyboard extension, and it isn't bad, but its no replacement for protoInputLine. One may have noticed my "15" typo instead of "is" in a previous email. WritePad seems to have difficulty telling my capital-I's from my number-1's.
One thing I noticed is that when writing in Einstein, the ink tends to disappear too quickly, even mid-word in some cases. Perhaps the iPad Pro's A9X is too fast for this-- and its processing the HWR too fast? It still recognizes things correctly, but its a little annoying when you cross a T or dot an I that was in a previous ink stroke that's been already cleared.
More information about the NewtonTalk