Mac Catalyst: How to make a "Done" button that invokes its action when the return key is pressed?

On macOS it is typical for apps to have a "Done" button showing at the bottom of a window sheet. Usually the button is blue (or whatever your system accent color is set to) and this button can be invoked by pressing the return key.

On NSButton all you do is assign the return key as the key equivalent. So in the Mac Catalyst environment how do I achieve this behavior? I'm able to get the button to look exactly how I want configuring UIButton like this:

UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeSystem];
[doneButton setTitle:@"Done" forState:UIControlStateNormal];
doneButton.role = UIButtonRolePrimary;

Is there a quick way to get its action to be invoked when the return key is pressed or do I have to manually implement UIKeyCommand?

Thanks in advance to anyone who answers.

Mac Catalyst: How to make a "Done" button that invokes its action when the return key is pressed?
 
 
Q