Keystrokes

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Sasch600xt
Normal user
Posts: 164
Joined: 10 Sep 2018, 16:37

Keystrokes

#1 Post by Sasch600xt » 14 May 2021, 18:06

Hello all,

i could not find the answere :(

is there a simple way to have ESPEasy connected via USB to an Windows 10 PC and submit asci keystrokes connected to an gpio port ?
So i want to press a hardwarebutton connected to the ESP and get a Keystroke (eg. F1) as a asci signal like a usb keybord.

Thank you for your help
Have a great Day
Sascha
"the flat earth society has members all around the globe"

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Keystrokes

#2 Post by Ath » 14 May 2021, 18:53

Are you thinking of this: https://www.arduino.cc/reference/en/lan ... /keyboard/ and implemented like this: https://hackaday.com/2012/06/29/turning ... -keyboard/ ?
Looks like it is only available on specific hardware, as the ESP's as we know them have an USB to Serial adapter on board, not a 1:1 USB controller that can be programmed to emulate a keyboard.

Ok, googling on I found this and eventually this, but that's quite cumbersome, IMHO.

If you have something more or less evil in mind :roll:, google for 'rubber ducky' :geek:

If actually you want a single key keyboard, they are available :ugeek:
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Keystrokes

#3 Post by TD-er » 14 May 2021, 22:01

ESP8266 and ESP32 (the one we support) cannot act as an USB HID device.
You could use a board with an 32u4 as an USB HID device and write a small sketch on it which may read from some pin(s) and turn those into keyboard keystrokes.
For example pressing Windows-key + L to lock the PC.

The newest Espressif cores do seem to (finally) support the ESP to work as an USB device, but those are not yet supported by ESPEasy (you probably can't even order silicon of those right now)
Also those cores use a completely different architecture, so it will take quite a while before those will be supported.
For example the ESP32-S2 was introduced in 2019 and I tried to make an ESPEasy build for it a few weeks ago and failed miserably as the libraries are just not ready yet. That's over 20 months since introduction and still not supported, so it may take a while before those recently introduced (few weeks ago) new Espressif chips will be supported here. :(

Would be nice to support USB natively from ESPEasy as you may also allow upgrading it as if it is an USB thumbdrive for example.

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests