Skip to main content
Bumped by Community user
added 50 characters in body; edited title
Source Link
ocrdu
  • 1.8k
  • 3
  • 12
  • 24

HID Keyboardkeyboard: Sendsend modifier keys only

I want to send modifier keys like shift, alt, ctrl, etc. without any other key. It should be theoraticalytheoretically possible due to the fact that it works for my normal keybaord.keyboard (Testedtested it with Xoutput and games).

For now I have to send dummy keystrokes like scroll lock (0xCF) to send the modifiers. I'm using https://github.com/espressif/arduino-esp32Arduino core for the ESP32 with the ESP32S3 Dev Module.

#include "USBHIDKeyboard.h" 
USBHIDKeyboard Keyboard;
Keyboard.press(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);
delay(1000);
Keyboard.releaerelease(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);

This works, but itsit's realy ugly,: sometimes the scroll lock LED flashes and in games the settings somtimes seessometimes see the scroll lock and complainscomplain.

Any ideas?

HID Keyboard: Send modifier keys only

I want to send modifier keys like shift, alt, ctrl, etc. without any other key. It should be theoraticaly possible due to the fact that it works for my normal keybaord. (Tested it with Xoutput and games).

For now I have to send dummy keystrokes like scroll lock (0xCF) to send the modifiers. I'm using https://github.com/espressif/arduino-esp32 with the ESP32S3 Dev Module.

#include "USBHIDKeyboard.h" 
USBHIDKeyboard Keyboard;
Keyboard.press(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);
delay(1000);
Keyboard.releae(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);

This works but its realy ugly, sometimes the scroll lock LED flashes and in games the settings somtimes sees the scroll lock and complains.

Any ideas?

HID keyboard: send modifier keys only

I want to send modifier keys like shift, alt, ctrl, etc. without any other key. It should be theoretically possible due to the fact that it works for my normal keyboard (tested it with Xoutput and games).

For now I have to send dummy keystrokes like scroll lock (0xCF) to send the modifiers. I'm using Arduino core for the ESP32 with the ESP32S3 Dev Module.

#include "USBHIDKeyboard.h" 
USBHIDKeyboard Keyboard;
Keyboard.press(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);
delay(1000);
Keyboard.release(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);

This works, but it's realy ugly: sometimes the scroll lock LED flashes and in games the settings sometimes see the scroll lock and complain.

Any ideas?

Source Link

HID Keyboard: Send modifier keys only

I want to send modifier keys like shift, alt, ctrl, etc. without any other key. It should be theoraticaly possible due to the fact that it works for my normal keybaord. (Tested it with Xoutput and games).

For now I have to send dummy keystrokes like scroll lock (0xCF) to send the modifiers. I'm using https://github.com/espressif/arduino-esp32 with the ESP32S3 Dev Module.

#include "USBHIDKeyboard.h" 
USBHIDKeyboard Keyboard;
Keyboard.press(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);
delay(1000);
Keyboard.releae(KEY_LEFT_CTRL); Keyboard.write(0xCF); Keyboard.write(0xCF);

This works but its realy ugly, sometimes the scroll lock LED flashes and in games the settings somtimes sees the scroll lock and complains.

Any ideas?