ControllerMate (part 11 of 14). Distinguishing between one-button and two-button clicks.

Note: this is not a substitute for the original and most excellent ControllerMate tutorial. I am endeavoring to save some time for those who have read it and now are eager to get things done.

Important: I strongly recommend that for the duration of this adventure you find and connect an extra mouse to your Mac – that way even if you mis-configure your target device you will still have full control.

This is part eleven in a series of posts. For the full table of contents go here or here.

When you click two buttons “simultaneously”, one of them is inevitably registered before the other. Damn the perfectionist high-precision computers!

With a little thinking I have come up with a solution:

one or two buttons

Here you can press the two buttons “simultaneously” in any real order and still get your Purr, but pressing button #2 alone gives you a Submarine sound. This solution is not perfect – it depends on the time delays being right for your usage, otherwise it is possible to register both conditions at the same time. Thanks to Ken (the intrepid ControllerMate developer), the delays are easy to adjust in the inspector.

Why am I bothering with this? – Simple:  some cases you really do not want your mouse buttons to accidentally trigger their single-click function (like, say, opening of the context menu).

And now we can put together something spectacular.


About this entry