How to turn off certain shortcut
Command + Comma (,) on Safari opens Preferences, as shown here:

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

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

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.