Arduino Micro as HID is not sending button pressing

Hello,
I have a problem with Arduino Micro as HID.
Here is my test code:

#include "Keyboard.h"

void setup() {
	Keyboard.begin();
}

void loop() {
	delay(5000);
	Keyboard.press('a');
	delay(50);
	Keyboard.releaseAll();
}

It works on my PC, but doesn't work on my laptop.
How can I fix this problem?

What's runing on your laptop? Maybe it wants to use the BootKeyboard protocol. Install the HID-Project library (available in the library manager) and try this:

#include <HID-Project.h>

void setup() {
	BootKeyboard.begin();
}

void loop() {
	delay(5000);
	BootKeyboard.press('a');
	delay(50);
	BootKeyboard.releaseAll();
}

Usually a Laptop has a built-in boot keyboard so it doesn't accept an external boot keyboard. Have you tried to use the standard keyboard instead?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.