How to turn off certain shortcut [duplicate]

Solution 1:

Command + Comma (,) on Safari opens Preferences, as shown here:

enter image description here

To remap it, go to System Preferences » Keyboard » Shortcuts » App Shortcuts… and click the + button:

enter image description here

Then set the app as "Safari" and "Preferences…" as the item you want to add a new keyboard shortcut for, like so:

enter image description here

I chose Command+Option+Control+P but you can choose whatever you want.

Once you click “Add” on that final window, you should be able to use Command+Comma elsewhere without interference.