How to create the first script - USB to TCP socket

Good evening everyone. My name is Alef, I have been a Brazilian developer of microcontroller firmware for several years and I know how to program in several languages.
Now I'm entering the world of openWRT and I really need your help.
For a very important personal project for me, I need to take the events from a USB keyboard and send them to a TCP server per socket.
Using "triggerhappy" I can see keyboard events happening over SSH and I intended to use "luasocket" or "socat" to send what I type on the keyboard to the TCP server.
However, I felt very lost, because I don't know where and how I write my applications.
Could someone help me get started?
I really need to start the project.

Thank you.

Which part of the project will reside in the OpenWrt device? The part that captures and sends the events? Or the part that receives them?

Probably this guide and examples are useful for you:

https://openwrt.org/docs/guide-developer/helloworld/start

Good morning "eduperez". OpenWRT will be on the TP-link mr-3020. The Keyboard will be connected to your USB and it will send the data entered to a computer that has an open socketTCP server. Thanks.

Thank you. I will take a look. Yes, I already have a gitHub account and I intend to put what I did and discover it there.