I'm trying to have a button press input a keystroke. I'm using the MKR Zero board, and it is not currently working properly. The LED lights up when the button is pressed, but no keystroke is inputted. Eventually, I plan on integrating flex sensors as an additional prerequisite for the input later down the road, but I feel like I should pass this hurdle first.
As to your code, because buttonPin is set to use INPUT_PULLUP its state will be HIGH unless the button is pressed, assuming that your circuit takes the pin LOW when the button is pressed.
Assuming that you want to send 'c' when the button is pressed is the logic of your sketch correct ?
I changed the placement of Keyboard.begin() to setup(), and changed INPUT_PULLUP to just INPUT, but I'm receiving the same results. The logic makes sense to me, but I'm completely new to c++ and have been mashing together what I've researched from the Arduino reference pages.