Is there a way to send a key press through 2 serial ports?

Hi I'm using two teensy 4.1s plugged into two different ports on my computer. I'm trying to sync their start times up before they enter the void loop. I was thinking that in the setup I have them both wait until I press enter and then they should both start the loop at the same time. I put this at the end of both of the void setups

while (Serial.available()) {Serial.read();}  
Serial.println("PRESS ENTER TO START");
while (!Serial.available()) {;}

but when I press enter it only sends through one port and not the other. Is there a way to send it through both ports at the same time?

Your computer cannot read data from or send data to two different serial ports at the same time.

One way to synchronize two MCUs is to have them wait for a signal from a digital input. They must have a common ground for that to work.

Because the clock frequencies are not the same, the two MCUs will drift out of sync pretty rapidly.

Your describing a single detail.

If you post an overview about your project and what you want the two teensys 4.1 to do in the end good suggestions how to achieve this can be made.

if two devicea shall be in sync the usal way is some kind of synchronising signal.

How often this signal is sended received depends on the precision they shall be in sync
down to the microsecond or half a second?

best regards Stefan

...some set of meaningless operations...

You read a byte from the port - so what? Where do you use it?
Why do you expect that you will send a signal through two ports if you did not send anything to this port?