Skip to content

Commit 9592a7c

Browse files
author
sh-aks
committed
Add Note and Warning
Keyboard.adoc and Mouse.adoc
1 parent c356e14 commit 9592a7c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Language/Functions/USB (Leonardo and DUE only)/Keyboard.adoc

+11
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ The library supports the use of modifier keys. Modifier keys change the behavior
2424
--
2525
// OVERVIEW SECTION ENDS
2626

27+
[float]
28+
=== Notes and Warnings
29+
These core libraries allow a 32u4 based boards or Due and Zero board to appear as a native Mouse and/or Keyboard to a connected computer.
30+
[%hardbreaks]
31+
*A word of caution on using the Mouse and Keyboard libraries*: 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()` will move your cursor or send keystrokes to a connected computer and should only be called when you are ready to handle them. 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.
32+
[%hardbreaks]
33+
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. Refer to the Mouse and Keyboard examples for some ways to handle this.
34+
[%hardbreaks]
35+
// FUNCTIONS SECTION STARTS
36+
[#functions]
37+
--
2738

2839
// FUNCTIONS SECTION STARTS
2940
[#functions]

Language/Functions/USB (Leonardo and DUE only)/Mouse.adoc

+9
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ title: serial
1717
[float]
1818
=== Description
1919
The mouse functions enable a Leonardo, Micro, or Due to control cursor movement on a connected computer. When updating the cursor position, it is always relative to the cursor's previous location.
20+
[%hardbreaks]
2021
--
2122
// OVERVIEW SECTION ENDS
2223

2324

25+
[float]
26+
=== Notes and Warnings
27+
These core libraries allow a 32u4 based boards or Due and Zero board to appear as a native Mouse and/or Keyboard to a connected computer.
28+
[%hardbreaks]
29+
*A word of caution on using the Mouse and Keyboard libraries*: 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()` will move your cursor or send keystrokes to a connected computer and should only be called when you are ready to handle them. 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.
30+
[%hardbreaks]
31+
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. Refer to the Mouse and Keyboard examples for some ways to handle this.
32+
[%hardbreaks]
2433
// FUNCTIONS SECTION STARTS
2534
[#functions]
2635
--

0 commit comments

Comments
 (0)