-->
Page 1 of 1

Sending keyboard codes from a script

PostPosted: Mon Feb 14, 2022 2:14 pm
by timg11
The espusb code provides a nice websockets interface that is suitable for a browser interaction, but not scriptable as far as I can tell.

I'm looking for a way to send a keycode from a script. Using curl would be fine, or I can even directly send a UDP packet.

I'm trying to decipher the message forma required by the issue() function to send a keyboard keypress.

I've started a thread on the espusb github issues page

If anyone has successfully scripted the espusb, please post here or there.

Re: Sending keyboard codes from a script

PostPosted: Tue Feb 15, 2022 8:27 am
by rpiloverbd
Hello, are you planning for something like this?

https://www.youtube.com/watch?v=lxhbZLN ... e=youtu.be

Re: Sending keyboard codes from a script

PostPosted: Tue Feb 15, 2022 9:10 am
by timg11
@rpiloverbd, my goal is to provide a replacement Wake on LAN for a system where the WOL function no longer works. The system is still able to wake on Keyboard, so I want to send a key to wake it. I need to send the wake command from a shell script, not a manual interaction. Both the original development by @cnlohr on github and the video you linked demonstrate a manual operation. BTW, the youtube poster omri says a link to the code was posted, but I don't find it.