-2

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?

6
  • 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? Commented 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? Commented 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 Commented Dec 3, 2019 at 8:31
  • @asaf, perhaps you could use a PS2 keyboard that is directly connected to the arduino Commented Dec 3, 2019 at 8:33
  • @Juraj it has been edited by an 'anonymous user'. Commented 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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.