Hey Andreas, do you think you can implement something like - GitHub - taigrr/spank: Slap your MacBook, it yells back. Uses Apple Silicon accelerometer via IOKit HID. · GitHub in BTT? In terms of accessing the data from the accelerometer so that it can be used a trigger?
Unfortunately accelerometer requires root / elevated privileges. Usually I try to avoid that within BTT, but I could maybe offer it as an optional xpc service like the process priority helper tool.
actually it seems to work in BTT without root - not sure why, last time I tried it didn't. Maybe something changed in recent macOS. I'll add it!
I have added it in 6.316 alpha, would be great if you could check whether it works on your machine or whether there is something special that makes it only work in my setup without root
The thing why this is usually locked behind root is that these accelerometers are so sensitive, if you train some model on a users typing behavior it would be possible to do a keylogger that worksaround the system protections like secure input.
It is working, thank you! I get you point about why it should be locked behind root so maybe put some warning?
By they way even with "Required Impact Strength" == 10, the trigger fires. Is there possibility to make the max strength to be configurable (more than 10)? Even when I'm typing on the MacBook's keyboard the action is executed. I'm not pressing the buttons softly, but it is not that hard either.
Even this triggered the action:
If BTT can access it anybody can access it without root, so a warning is not necessary (but I guess it is not intended by Apple for this to work - the other projects all mention root is required)
Which trigger have you selected? The light tap? or the knock?
6.317 (uploading) makes triggering these a bit harder in general and now also allows values from 1-100
Hey Andreas the changes you made, make a difference now, thank you!
The "Required Impact Strength", for all accelerometer actions, however still shows max value of 10 in the brackets. BTW what is the difference between tap and knock - I was not able to find any, I mean i guess knock should require more strength, right?
BTW, when the "Show Accelerometer Live View" window is opened BTT consumed CPU spikes and the window itself become somewhat unresponsive.

