0

I have an arduino uno connected to my laptop. and i need to get keypress info from the laptop's keyboard with only the arduino sketch and without any program running on the laptop. Is there a specific library or some way of doing so?

5
  • As you wrote your question: No, you can't do this. How could a sketch running on the Arduino make the computer transfer keyboard input, if there is no program for this running on the computer? Dec 3, 2019 at 7:19
  • I read this question and commented it earlier today. Did you delete it and ask again with the "no program" addition?
    – Juraj
    Dec 3, 2019 at 8:20
  • @Juraj, you are correct in your thinking ... i have also seen this same question earlier ... i commented about using Processing ... now the OP apparently wants to use a keyboard on a laptop that is shut down ... lol
    – jsotola
    Dec 3, 2019 at 8:31
  • @asaf, perhaps you could use a PS2 keyboard that is directly connected to the arduino
    – jsotola
    Dec 3, 2019 at 8:33
  • @Juraj it has been edited by an 'anonymous user'. Dec 3, 2019 at 9:25

1 Answer 1

1

You can't. It's impossible.

Or not as you have requested it, anyway.

The Arduino can only talk over Serial, so you will have to have some software running on the PC that transfers data (however that data is generated) over serial to the Arduino to process.

The only other option will be to have one of the Arduino boards that is capable of acting as a USB Keyboard device, such as a Leonardo, plus either a PS/2 keyboard or a USB keyboard plus a USB Host shield. Your Arduino the receives the keystrokes from the keyboard, processes them, and sends the result on to the PC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.