Hacker News new | ask | show | jobs
by archagon 3222 days ago
Huh, neat! I was wrong, didn't realize BTT supported that. I'm using fake three-finger swipes for my app as well, via the calftrail code you mentioned. (Hence the GPL license.) Are you using a different trick? Is there a more elegant way to do it barring private API access?
1 comments

No, unfortunately it's not elegant at all :-)

I'm basically using CGEventCreateData to save an original system three finger swipe, then I'm just generating an event based on that saved data and refresh the timestamp and mouse location before sending it.

Thanks for the info! I was considering doing something similar when I was building my app, but calftrail's code saved the day...

Wish developers were legitimately able to generate those three-finger swipe events, because they are ubiquitously supported and really useful. (Just the other day, I discovered that Preview allows you to switch pages by swiping up and down! Weird.)

Up and down swipes were quite common before macOS 10.9 and some apps still implement them. They basically trigger a page up/page down event.