One color + shortcuts profile per software ? Arduino custom Macro keyboard - Che

Hi,
I am new to arduino, and I wanted as a project to build a 26 RGB keys keypad to create a custom shortcut/macro keyboard.
Arduino micro, 24 keys RGB CherryMX for shortcuts + 2 to set keyboard layers. (like a fn key)

The idea is to auto trigger a different profile per program, RGB color, shortcut and layers.

Let's say, Photoshop = Blue + 3 specific shortcut mapping + layers.
Blender = Orange + etc...

How this would be achievable ?
I think that the layers and shortcuts should be managed via software like AutoHotKey. Like this the keys are just F14,F15,F16... on the keypad.
But how to send the info to the arduino to say, this program is in focus, set these colors ?

(The goal is to have the same profile management as a logitech software.)

Thank in advance for your help.

For update, I got more informations.
It seems the serial port of the arduino can receive commands from autohotkey.
Autohokey can track the app in focus with a command WinTitle /WinText, so it would be possible to attribute profiles per app I guess.

But how to connect the arduino serial port to the pc ?
Is this done via the micro usb port ?

But how to connect the arduino serial port to the pc ?
Is this done via the micro usb port ?

Yes. But this only sends data to the PC’s serial port not the keyboard buffer which is where it should end up.
Look up the examples for the Arduino micro for how to do this.
Start here https://www.arduino.cc/en/Main/ArduinoBoardMicro?setlang=en

Thanks, I will look into that.
Serial Port, Keyboard Buffer, I feel it's getting closer ^^