You can apply the changes that you made and hide a dialog box by pressing the ENTER key.
You can also close a dialog box by activating its Close or Cancel button with the ESC key. In the case of the Close button, the changes that you made will be saved. In the case of the Cancel button, the changes will be discarded.
See also
About using shortcut keys