Skip to content

Added an example code to control Keyboard and Mouse from Arduino #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Arsh0508
Copy link

I really hope this example would be much more visible if it's directly in the library and hence can really help beginners.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please spell the sketch name the same as in the existing example sketch: KeyboardAndMouseControl

Example sketches must be placed under the examples folder in a subfolder that matches the sketch name exactly:

Mouse
|_examples
   |_KeyboardAndMouseControl
      |_KeyboardAndMouseControl.ino

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#library-examples

@per1234
Copy link
Contributor

per1234 commented Mar 16, 2020

As I brought up in #13 (comment):

One thing to note is that this example already comes bundled with the Arduino IDE (and Arduino Web Editor) under File > Examples > 09.USB > KeyboardAndMouseControl.

It does make sense to bundle the examples with the library since the IDE bundled examples are not available to arduino-cli and Arduino Pro IDE users. I don't like the idea of having duplicate code to maintain, but it also could be problematic to remove the built-in sketches since there are likely tutorials that point people to that menu path. I suppose we could replace the content of the built in sketches with a comment like:

// This example has been moved to File > Examples > Mouse > KeyboardLogout

(should be adapted to make sense for Arduino Web Editor users also)

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Arsh0508
Copy link
Author

@per1234 thanks your valuable feedback and time once again, will do the needful changes and let you know.

@Arsh0508
Copy link
Author

I recommend also adding the layout and schematic files from https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/KeyboardAndMouseControl
Sure sir, if you think that will help

@Arsh0508 Arsh0508 requested a review from per1234 March 17, 2020 08:55
Comment on lines +1 to +5
/*
This example has been moved to File > Examples > USB > KeyboardAndMouseControl
https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/KeyboardAndMouseControl
*/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*
This example has been moved to File > Examples > USB > KeyboardAndMouseControl
https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/KeyboardAndMouseControl
*/

This makes no sense. The example has not been moved to File > Examples > USB > KeyboardAndMouseControl. The example has always been there. The whole point of your pull request is to move (or copy) that sketch FROM File > Examples > USB > KeyboardAndMouseControl TO File > Examples > Mouse > KeyboardAndMouseControl.

There is no benefit to providing a link to the copy of the sketch in the arduino/Arduino repository. If they saw that comment, the user is already looking at the sketch.

@per1234
Copy link
Contributor

per1234 commented Mar 23, 2020

This still isn't done:

Please spell the sketch name the same as in the existing example sketch: KeyboardAndMouseControl

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@per1234 per1234 linked an issue Nov 2, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example sketches
3 participants