Makro for switching display settings

Hi guys,


i have a microsoft sidewinder X4 keyboard. It has macro keys and i want to create a macro with it to switch between two display modes. I have a Laptop that's connected to an external display via HDMI. I want to switch between the extended display mode for browsing the web and the mode just on my external display for gaming. i want one button just to switch between these two modes.

Sorry my native language is german.