Sending keystrokes to the computer over USB

Posted on
  • First off I apologize if this has been covered already, I searched the forums but couldn't find any mention of it.

    Is there a way to send keystrokes to the connected computer over USB like a keyboard?

    I wanted to play with the idea of using it as a OTP device or a static Yubikey type setup.

  • That is not supported, but see: https://github.com/espruino/Espruino/iss­ues/221

    Others are interested in doing the same sort of thing.

    That said, it looks like it's not a high priority to add. I'm having trouble thinking of a compelling use case, honestly.

  • Yes, sorry - it's not possible yet. I guess it might be useful for make your own gamepad type things though...

    If you wanted, I think you could connect an (active) USB to PS2 adaptor up and then plug Espruino in on the PS2 side.

    If someone did contribute the code to make it work I'd love to include it, but right now I don't have time to work on it myself I'm afraid.

  • (Sorry for bumping this old thread..)

    I ended up buying a Teensy only because it can register as a USB keyboard while the Espruino can't.

    If the upcoming smaller Espruino gets an "inline" USB connector like the Digispark USB Development Board (I've heard rumours), it would be perfect for these kinds of things.

    In addition to registering as a keyboard, the Teensy can also register as a mouse, joystick, MIDI device or even flight simulator controls(!). Also normal USB serial data, and Raw HID to communicate with your own Mac or PC apps. Lots of interesting uses!

    Edit:
    I just read your comment from this morning on the related issue, I actually hadn't seen it :) I'm cross-referencing this comment to the thread where the discussion is happening now..

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Sending keystrokes to the computer over USB

Posted by Avatar for JoshStrange @JoshStrange

Actions