How I can set command-delete as a custom keyboard shortuct?

Solution 1:

I figured out the answer. It doesn't appear to be possible to achieve that using System Preferences. I had to use Terminal to directly edit defaults using the following command.

defaults write <plist name of application> NSUserKeyEquivalents -dict '<name of button in menu bar>' '@'

For instance, to map ⌘+⌫ to Delete menu item in Anki, I used the following command:

defaults write net.ankiweb.dtop NSUserKeyEquivalents -dict 'Delete' '@'

There is an invisible unicode character for backspace behind @. To enter it manually, open Emojis & Symbols and type "u+0008".