Option to eat the keyboard event

Say I have a keyboard shortcut S1 for all apps.
Then I have shortcut S2 with the same trigger in app A which I want to overwrite the S1 shortcut from all apps.

Currently both actions from S1 and S2 are triggered at once. I want only the S2 to be triggered.