Arduino MouseKeyboard Library

Mouse and Keyboard libraries

These libraries allow a 32u4 or Due board to appear as Mouse and/or Keyboard to a connected computer

Warning

If the Mouse or Keyboard library is constantly running, it will be difficult to program your board. Functions such as Mouse.move() and Keyboard.print() should only be called when you are ready to handle cursor or keystrokes. 
It is recommended to use a control system to turn this functionality on, like a physical switch or only responding to specific input you can control.

When using the Mouse or Keyboard library, it may be best to test your output first using Serial.print(). This way, you can be sure you know what values are being reported.

The keyboard functions enable a Leonardo, Micro, or Due to send keystrokes to an attached computer.

Note

Not every possible ASCII character, particularly the non-printing ones, can be sent with the Keyboard library. The library supports the use of modifier keys. Modifier keys change the behavior of another key when pressed simultaneously. See here for additional information on supported keys and their use.


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc