Compatibility with Carbon's HIToolbox Framework?

I love BTT because it lets me regain a middle button based pasting on the Magic Mouse. It works great for iTerm2. I have another app though that can't see a middle click. Is there any reason this shouldn't work for apps that still use Carbon's HIToolbox Framework*? I'm using an app called Barrier that allows me to use my Mac keyboard and mouse to drive other machines. Looking through the logs on the slave machine, I can see it is being sent a mouse click for button 1 and 3 but not 2. I downloaded the source and noticed that Barrier was using GetCurrentButtonState(). Since this call can ignore the event queue, I figured that maybe BTT was capturing the buttons state in the queue and re-writing the queue events before other apps saw it. Unfortunately, that doesn't seem to be the case, I recompiled Barrier to use GetCurrentEventButtonState() hoping it would get updated events from BTT, but there is no change.

It seem sad to regain the middle click for OSX but then actually lose it when driving my Linux machine.


  • Apple says that Carbon is dead, Carbon is dead, but these event handling commands seem to be still valid as far as XCode on Catalina is concerned. They compile just fine on an up-to-date machine.