Differance between keys send from an Arduino keyboard and a real keyboard

So I would like to use a Arduino Leonardo to create a keyboard with some common complex terminal commands. I understand how I should do this project, but one issue i'm having trouble with is to detect if the command is comming from the Arduino or if a command comes from my usual keyboard.

When the Arduino Leonardo sends a keypres via the USB port. Is there any flag showing it comes from an Arduino? or are the keys sent exactly the same as from a regular keyboard?

I could look at what USB port the command is coming from. But then the Arduino needs to use the same port everytime so I rather not do this.

When the Arduino Leonardo sends a keypres via the USB port. Is there any flag showing it comes from an Arduino?

Yes, but not an easily detectable.

or are the keys sent exactly the same as from a regular keyboard?

Yes, that's the intention. The keys are sent exactly as if the Arduino is a regular keyboard. From a technical point of view the Arduino is a regular keyboard.

I could look at what USB port the command is coming from. But then the Arduino needs to use the same port everytime so I rather not do this.

This sounds as you would like to distinguish between the Arduino and a standard keyboard. Why would you like to do that?

This project is exactly like my keypress simulator which is documented in detail here.

It was built to test client pc serial input and works on any pc, just plug it into a usb port. The PC doesnt know its not a real keyboard.

You need to make provision for stopping it if you want to use conventional keyboard entry - mine does that with a selector switch.

Good example of a state machine too.