Synchronize to current heading

Hi folks, I would like to recreate the autopilot panel of the TBM 930 with the Arduino Leonardo.
I made a basic setup on the preparation board and assigned the rotary encoders and knobs to the flight simulator.

So far everything works except for one thing - the button “Synchronize to current heading” on the HDG encoder in the game. I couldn’t find a control in the settings that does exactly the same thing. At the moment I set the encoder’s rotary knob to “Set Heading Bug”, which sets the indicator to north and not to the current direction, which is what I want to achieve.

Can you help with that?!

I’m not sure if I’ve understood your question correctly but the ] key is TOGGLE AUTOPILOT HEADING HOLD, when I’ve turned on the autopilot and hit this key the heading bug syncs to my current heading.

Trying to accomplish the same with the encoder button. Did you find a solution?