Using buttons in Prompt for User Input for things other than OK and Cancel

Well, to be clear:

  • The first button has a default key of Return
  • The second button has a default key of Escape/Command-.
  • Other buttons have no default key
  • Whatever button has the key Return will be the “Default” button, highlighted appropriately by the system.
  • Any button can Cancel the macro as determined by the checkbox.

The terminology for canceling a macro could have been “Abort”, but it isn’t, it’s Cancel, and it’s not really enough to change this at this point just to be clearer for this case.

In Mac OS and OS X, good UI defines:

  • the default button should be the “OK” button, the one that performs the normal behaviour
  • the default button should be rightmost
  • the left most button should be “Cancel”
  • other buttons may vary
  • If the normal behaviour is significantly dangerous, then it may be appropriate for it to not be the default button, or for there to be no default button.

“normal behaviour” here is defined as doing what the user just asked to do.

A consequence of all of this is that if you have a second button in the Prompt For User Input action, and it does not cancel the macro, then you should definitely give it some other key, or disable it with “/-”.

I will change the code so that if the first button has the Cancel Macro flag, then it is not the default (by default), and if the second button does not have the Cancel Macro flag, then it does not get the Escape/Command-, key (by default).

2 Likes

@peternlewis and all:

I have updated the Keyboard Maestro Wiki to reflect Peter’s post:
Prompt For User Input

2 Likes