Optimizing net

Is that ok using a lot of net in one addon?
How to send keys (input lib) from client to server without net and it’s ping? Or if its impossible to avoid using net how to optimize them?

The key is to only send information through net only when its needed, e.g. instead of sending all of the key states each frame, only send a message whenever a key is changed, and etc.

Maybe you can send keys with a console command, but I think net is still better.

Unless you need it to be updating as you type, allow the user to type what they want and then just send the whole text as a single message - this will greatly reduce network traffic.

Another approach could be meeting in the middle - only send the message N times per second and just buffer input, send it, clear it, repeat.