You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a project using a Digispark microcontroller (based on the ATTiny85) and the DigiKeyboard library to emulate a USB keyboard. My goal is to send three (piano) keys simultaneously (e.g., 'K', 'X', and 'A'), but I'm facing some difficulties.
#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.delay(5000); // Give time for the system to recognize the device
// Pressing multiple keys
DigiKeyboard.sendKeyPress(KEY_K);
DigiKeyboard.sendKeyPress(KEY_X);
DigiKeyboard.sendKeyPress(KEY_A);
DigiKeyboard.delay(1000); // Hold for a second
// Releasing keys
DigiKeyboard.sendKeyRelease(KEY_K);
DigiKeyboard.sendKeyRelease(KEY_X);
DigiKeyboard.sendKeyRelease(KEY_A);
}
void loop() {
// No continuous actions needed
}
but I see each time I call sendKeyPress() the previous key gets released. Anyway I can keep it pressed?
The text was updated successfully, but these errors were encountered:
I'm currently working on a project using a Digispark microcontroller (based on the ATTiny85) and the DigiKeyboard library to emulate a USB keyboard. My goal is to send three (piano) keys simultaneously (e.g., 'K', 'X', and 'A'), but I'm facing some difficulties.
but I see each time I call sendKeyPress() the previous key gets released. Anyway I can keep it pressed?
The text was updated successfully, but these errors were encountered: