Go to the Keyboard and Mouse system preferences panel. On macOS 10.3 and later, it allows you to assign key shortcuts to arbitrary menu items.
Keyboard and Mouse