SS4/CE Toggle Keyins

I have nearly every function key tied to a keyin in order to quickly change tool settings on the fly for more expedited drawing creation.  In many cases these come in pairs were F5 and F6 each perform a similar keyin effectually just toggling back and forth between them.

Is there a way to do this with just a single button press to verify the current state and then toggle it to the other.  Or possible single click = keyin-A and double click =keyin-B