#include <Keyboard.h>
Keyboard keyboard;
#define BUTTON 13
void setup() {
pinMode(BUTTON, INPUT_PULLUP);
keyboard.begin(); // Initialize the Keyboard library
}
void loop() {
static int lastButtonState = HIGH;
int buttonState = digitalRead(BUTTON);
if (buttonState == LOW && lastButtonState == HIGH) {
// Button was pressed
keyboard.write('a');
}
lastButtonState = buttonState;
}