Hacker News new | past | comments | ask | show | jobs | submit login

On the topic of macOS power usage: I made a free open source app that lets you use the side buttons on your third-party mice for system-wide navigation[1], just like in Windows. Other apps can do this too, but practically all of them bind the buttons to annoying keyboard shortcuts and frequently exhibit unexpected behavior. Mine is (sort of) event based and works a lot better, including in Xcode!

Not to toot my own horn (I mean the app is pretty simple) but it's a splinter that's been bothering me about macOS for years and years.

[1]: http://sensible-side-buttons.archagon.net




Starting to go off topic but have you checked out BetterTouchTool[1]? It's not _just_ another window tiling app for the Mac. It also lets you conveniently remap trackpad gestures and taps, 3rd party mice (yes you can remap your side buttons if you want), keyboard shortcuts, etc. The coolest thing is that if you really want, you can also restrict your remaps to work only in certain applications. I've been using it for years and just wanted to share.

[1]: https://www.boastr.net


I really wish something like this were available on Linux. I moved an old Mac to Linux (no OS updates from Apple), and the biggest things I miss are good support for multitouch gestures with Apple Magic Trackpad and an app like BetterTouchTool that helps make the standard experience even better. I bought BetterTouchTool (when it went to a paid app from donationware), and I would buy something like it if it were available on Linux. I spent quite sometime researching for solutions and trying some stuff, but right now the experience of using the Magic Trackpad on Linux is just the same as using a mouse.


BTT also lets you remap Apple TV remotes to whatever shortcuts you want in whatever apps -- I've used it many times to do presentations


BTT also lets you customize the touchbar. And go full Minority Report with gestures on the trackpad.


For the specific purpose of remapping side mouse buttons, BTT only allows you to bind them to keyboard shortcuts. As far as I can tell, no tool except for the one I made lets you bind them to virtual swipe events (which generally work better).


BetterTouchTool has always had the "mimicking standard gestures" predefined actions which really send gesture events and don't just send shortcuts. However it currently only supports three finger swipe left and right (which are the most useful to go back and forward). I probably should look into how to synthesize other gestures as well (there is no official API for synthesizing gestures but afaik people have reverse engineered how to do it, e.g. https://github.com/calftrail/Touch/tree/master/TouchSynthesi...)

For three finger swipes I'm using a trick to synthesize them without private API, but for other swipe types I'd need to synthesize them using the private API... However there haven't been too many requests for other event types thus it's not very high up on my TODO list.

(I'm the author of BTT)

Also BTT allows you to bind them to many many predefined actions in addition to keyboard shortcuts, e.g. "Trigger Menubar Menu Item" which can be very powerful.


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?


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.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: