Help Creating an Action

So I am trying to figure out how to create a keyboard short or trackpad action that would automatically enable or disable a particular filter under the network section of System Prefs (two different combinations such as Command O = Off Command E = On)

Does anyone have any ideas on how to do this?