Page 1 of 1

Send simple Keyboard key commands via USB?

Posted: Sun Mar 11, 2018 10:08 am
by PeterThePie
Greetings

On my PC, my on-board WoL simply does not work after "Shutdown" in Windows 10. However, enabling USB Keyboard in BIOS to allow "Wakeup" works perfect. Strange indeed!

So now I want to use my Raspberry Pi to send a simple keyboard key strike through it´s USB and into my PC´s USB port.
I plan to send this command as an SSH from my phone using Tasker.

I´m already using another R-Pi as a WoL server on another PC which handles WoL flawlessly. On that one I use command "sudo wakeonlan AA:BB:CC:DD:EE:FF" and send it as an SSH.

Now I want to use Tasker to send SSH command to tell R-Pi to send out a "keyboard key" through its USB.
How do I do this? I already know the Tasker app part. Just need to know the SSH command...

Re: Send simple Keyboard key commands via USB?

Posted: Sun Mar 11, 2018 5:56 pm
by thagrol
I don't know anything about tasker but here's roughly how I'd do it:
  1. Get a Pi zerow running raspbian stretch lite
  2. Get it connecting to your network vi wifi
  3. Have a look at http://isticktoit.net/?p=1383 for using the zerow as a USB keyboard
  4. Write yourself a set of scripts to handle receiveing a request and sending a keypress
I have published a couple of projects on giuthub that may server as examples. One that sends keyboard events and one that provides WOL to a PC via a different approach (a Pi connected in parrallel with the power and reset buttons). See here:

https://github.com/thagrol/pwdgen
https://github.com/thagrol/fakewake