Multiple fixes in Keyboard.{print,println} #853
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses multiple small issues in keyboardPrint.adoc and keyboardPrintln.adoc:
The syntax of
Keyboard.println()
is described as:where the
+
operator was meant to be a hard line break.The functions are described as “Sends a keystroke to a connected computer [...]” even though a string is actually sent as a series of keystrokes rather than a single one.
The functions are said to return the “Number of bytes sent”, although they return the number of keystrokes (two 8-byte reports are actually sent for each single keystroke).
Keyboard.println()
is said to end the output by “a newline and carriage return”, whereas in reality it sends a press and a release of Return, more commonly known as Enter.Regarding the last point, the current description of
println()
seems to imply that it sends the ASCII LF and CR characters, in that unconventional order. It should be noted that:println()
terminates the output by a single keystrokeTechnically, it would be more correct to specify that it hits the Return key. However, most people use “Return” and “Enter” interchangeably, and “Enter” seems more common and less confusing.