A single keyboard shortcut to toggle between different shortcuts

I'll start from my end goal so it will be clearer - I have a mouse with buttons that can be assigned to output keyboard shortcuts. I'm using Divvy and I want to use it so that whenever I click that button a different Divvy shortcut will be used. So for example:

  • 1st click - Center window
  • 2nd click - Align to the left
  • 3rd click - Align to the right
  • 4th click - Center
  • 5th click - left .... and so on

What piece of software am I missing to map between what I'll use with the mouse and the cyclic shortcuts to be used with Divvy?


You could use Karabiner to achieve this. Although you might have to write a small script to achieve this kind of functionality. There are a lot of great guides on how to use Karabiner and the doc section on the website is also a pretty good place to start.