Detect Event for Color Swapping/Resetting Colors?

Greetings

Is there a way to detect the swapping of foreground and background color (Shortcut X) as well as resetting the colors to black/white (Shortcut D) and react in my plugin to it?

I’ve tried with the addNotificationListener, but there are no recorded events.

Thanks!

is it the events you tried to find?

const photoshop = require("photoshop");

photoshop.action.addNotificationListener(["exchange", "set"], (e, param) => {
   console.log(e);
   console.log(param);
});

Heya, thank you for your reply. The two events I was looking for are “exchange“ and “reset“!