I'm new to Teensy, and I'm trying to write a program that allows it to act as a keyboard. To make my program more useful, I'd like to make it not try to act on any input until its drivers install. I saw on GitHub that a way to do this (assuming the user doesn't hit it themselves) is to instruct the program to hit caps lock until the LED turns on. The function I wrote looks like this:
void waitForInstall(){
boolean currCaps = keyboard_leds;
while ((currCaps & 2) == (keyboard_leds & 2)){
delay(200);
Keyboard.set_key1(KEY_CAPS_LOCK);
Keyboard.send_now();
}
}
When I try to compile this, Arduino IDE informs me that 'keyboard_leds' was not declared in this scope
. I'm sure I made a very basic mistake, but would anyone mind humoring me and giving me a push in the right direction? Thanks!