Keyboard.h (and Mouse.h) only works on devices that use the ATmega32u4 processor, like the Leonardo or Micro. See: https://www.arduino.cc/en/Reference/MouseKeyboard
Keyboard.h (and Mouse.h) only works on devices that use the ATmega32u4 processor, like the Leonardo or Micro. See: https://www.arduino.cc/en/Reference/MouseKeyboard