On macOS the shortcuts to cancel or accept a dialog are:
Cancel – Command-Period (.)
OK – Return
Could you enable the shortcut key for Cancel? In all KiCad windows I have tested, it does not work.
The Return key generally does work. However, in the two windows that I seem to use the most, it does not work!
Schematic Editor Symbol Properties Editor
You can check this yourself by selecting any symbol in the schematic editor and pressing E to open the symbol’s properties. No keyboard shortcuts work. I always need to click either cancel or OK to close the window.
Similarly, if you repeat the steps in the PCB editor (select footprint and press E), again it is the same results: Cancel and OK shortcuts do not work.
In the last two cases on Linux Return does work as OK but only if the cursor is not in the table area. I don’t have a hotkey assigned to Cancel. v8.0.9.
I tried it on MacOS in symbol properties. It is Shift-return.
As soon as you have entry fields within the dialog that accepts returns, to terminate the whole dialog it is shift-return.
I didn’t test the others, but also I don’t remember that it doesn’t work (or I simply got used to it).
Cancel is Esc I never used command-period and I’m not even aware of that command (after decades of MacOS).
For me ESC is used to Cancel.
The OK is dependent on where the focus is.
If in the table, simple Return confirm the current line and goes to the next.
Ctrl-Enter confirm the dialog wherever the focus is (equivalent of click the OK button).
Many native shortcuts are already included, but return seems tricky/over subscribed as described earlier. If there are specific dialogs that work more or less intuitively, you could make an issue on Gitlab to see if it is KiCad-specific or an issue with the underlying wxwidgets GUI library.
The command-period one is truly obscure though, I can’t find it on the “canonical” list here: Mac keyboard shortcuts - Apple Support
I’ve also used macOS for my entire life and never come across anything other than Escape as a way to cancel out of a dialog. I’m not a dev to say it could never be added though, I fixed a couple of Mac specific hotkeys related to text navigation a long time ago, so certainly there are options to special-case the Mac version of KiCad.
EDIT: The easy way to submit a formal feature request is to open KiCad, go to About KiCad > Report a Bug (or Help > Report a Bug). You will need a Gitlab account to make an issue.