When you restart MATLAB after an event caused the shortcuts file to be corrupted, MATLAB would have automatically regenerated the default shortcuts in a file named 'shortcuts_2.xml'. Therefore, if you would like to proceed with the default shortcuts, you can close and reopen MATLAB again and this error message will not be shown.
However, if you would like to restore the shortcuts, there are two methods that you can try as highlighted below:
OPTION 1: If you have had a previous release of MATLAB installed:
a) Navigate to the preference directory of the MATLAB R2017b release. You can find the preference folder by typing 'prefdir' in the MATLAB command window.
b) Then delete ‘shortcuts.xml’ and ‘shortcuts_2.xml’ from the R2017b preference folder.
c) Then navigate to the preference folder of the previous release and copy the ‘shortcuts_2.xml’ (or ‘shortcuts.xml’ if the former isn't present) to the preference folder of MATLAB R2017b release.
This will restore the command shortcuts to those of the previous release.
Please make sure that MATLAB is closed while performing the above steps on deleting and copying files.
OPTION 2: If you do not have a previous release of MATLAB:
a) Please check if the preference folder of the current release preferences folder contains both ‘shortcuts_2.xml’ and ‘shortcuts.xml’
b) If both files are present, please delete ‘shortcuts_2.xml’. This will cause MATLAB to regenerate ‘shortcuts_2.xml’ from ‘shortcuts.xml’.
c) However, if ‘shortcuts.xml’ is present, it was generated from an earlier release of MATLAB and will not contain shortcuts that were added subsequently.
Best Answer