The Shortcuts settings allow recording keyboard shortcuts for frequently used actions. Invoke a shortcut by pressing one or more modifier keys (Command, Option, Control, Shift) and a regular key like A, 5, Return, or Escape.

Click Record shortcut and press a shortcut on the keyboard to add the shortcut to the selected action. Keep the current shortcut by clicking the curved arrow  icon, or click the cross  icon to remove the current shortcut from an action:

Shortcuts are shown using key symbols:

Use the buttons at the top of the Shortcuts settings window to filter the actions list. All shows all actions, Customized lists only the actions with a changed shortcut, Menu shows all actions accessible from the menu bar at the top of the screen, and Commands shows actions within the current selection.

Actions are grouped into sections. Click the disclosure chevron  next to the title of a section to collapse and expand the section. Filter the list of actions further by searching for actions with the search field in the top-right.