Here’s something I’ve been working on.
It is a front-end for hopefully making working with the remote easier (and adds some useful functionality).
Here’s a demo with source. You’ll need to build and copy to device from the build options, as some info is sent to the console, but there’s an on-screen guide to the important bits.
https://www.dropbox.com/s/3gwxtxjfkcxekac/Apple%20TV%20Control%20test.zip?dl=0
It isn’t yet finished, but here’s what currently happens:
Button Z (light touch on pad) and button A (hard touch on pad) return x and y absolute positions.
Instead of axis and relativetouch events, these two buttons now have a moved phase as well as up and down.
Button also as a cancelled phase (for when you touch the pad lightly before pressing harder).
So all keys are treated mostly the same.
All button a and Z events will eventually return valid absolute and relative events, and will include things like distance, angle, most aligned axis etc.
Things to do:
-
addition of a resumed phase to button Z or cancelled to button a (for when a hard touch becomes a light touch, ie the reverse of my current button Z cancelled phase)
-
a fast light touch isn’t yet registered, but it will be.
-
you can’t detect when the menu button is pressed down. When you release it, you’ll get both the down then up events. Can’t fix that, it is apple controlling it.
I cheekily set menu to not quit the app so you can test it. To get out either press the screen button or hold the menu button for a few seconds. This last bit of functionality is likely why we don’t get a menu button down event immediately.
- my dX dY properties are not correct yet, nor I think are the time / duration things. Yet
Let me know what you think guys.