I want to generate key events in Linux(sorry, modified)

For instance something like this.

If a client sends character data using socket to the server socket,

then the server socket is recieved.

the server socket will generate key events(eg. Up arrow).

I’m trying to use SDL_EVENT from SDL Library to enable that.