From 32ca8c0057b4c7ec7a27ef2acdfa0ddd6a9ffaac Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 8 Nov 2017 23:52:36 -0800 Subject: [PATCH] Fix incorrect comments re: which click in Mouse example codes The default argument of these functions is MOUSE_LEFT. These are fixes for regressions of issues previously reported and fixed: - https://github.com/arduino/Arduino/issues/6501 - https://github.com/arduino/Arduino/issues/6500 - https://github.com/arduino/Arduino/issues/6499 - https://github.com/arduino/Arduino/issues/6498 --- Language/Functions/USB/Mouse/mouseClick.adoc | 2 +- Language/Functions/USB/Mouse/mouseEnd.adoc | 2 +- Language/Functions/USB/Mouse/mouseIsPressed.adoc | 4 ++-- Language/Functions/USB/Mouse/mousePress.adoc | 4 ++-- Language/Functions/USB/Mouse/mouseRelease.adoc | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Language/Functions/USB/Mouse/mouseClick.adoc b/Language/Functions/USB/Mouse/mouseClick.adoc index 3632b5cbe..eaa2e1f4b 100644 --- a/Language/Functions/USB/Mouse/mouseClick.adoc +++ b/Language/Functions/USB/Mouse/mouseClick.adoc @@ -63,7 +63,7 @@ void setup(){ } void loop(){ - //if the button is pressed, send a Right mouse click + //if the button is pressed, send a left mouse click if(digitalRead(2) == HIGH){ Mouse.click(); } diff --git a/Language/Functions/USB/Mouse/mouseEnd.adoc b/Language/Functions/USB/Mouse/mouseEnd.adoc index 8bb16733a..36bad5de1 100644 --- a/Language/Functions/USB/Mouse/mouseEnd.adoc +++ b/Language/Functions/USB/Mouse/mouseEnd.adoc @@ -56,7 +56,7 @@ void setup(){ } void loop(){ - //if the button is pressed, send a Right mouse click + //if the button is pressed, send a left mouse click //then end the Mouse emulation if(digitalRead(2) == HIGH){ Mouse.click(); diff --git a/Language/Functions/USB/Mouse/mouseIsPressed.adoc b/Language/Functions/USB/Mouse/mouseIsPressed.adoc index abb1aebf7..1fc030c8a 100644 --- a/Language/Functions/USB/Mouse/mouseIsPressed.adoc +++ b/Language/Functions/USB/Mouse/mouseIsPressed.adoc @@ -71,12 +71,12 @@ void setup(){ void loop(){ //a variable for checking the button's state int mouseState=0; - //if the switch attached to pin 2 is closed, press and hold the right mouse button and save the state ina variable + //if the switch attached to pin 2 is closed, press and hold the left mouse button and save the state ina variable if(digitalRead(2) == HIGH){ Mouse.press(); mouseState=Mouse.isPressed(); } - //if the switch attached to pin 3 is closed, release the right mouse button and save the state in a variable + //if the switch attached to pin 3 is closed, release the left mouse button and save the state in a variable if(digitalRead(3) == HIGH){ Mouse.release(); mouseState=Mouse.isPressed(); diff --git a/Language/Functions/USB/Mouse/mousePress.adoc b/Language/Functions/USB/Mouse/mousePress.adoc index 7ab100e4d..e771ce590 100644 --- a/Language/Functions/USB/Mouse/mousePress.adoc +++ b/Language/Functions/USB/Mouse/mousePress.adoc @@ -70,11 +70,11 @@ void setup(){ } void loop(){ - //if the switch attached to pin 2 is closed, press and hold the right mouse button + //if the switch attached to pin 2 is closed, press and hold the left mouse button if(digitalRead(2) == HIGH){ Mouse.press(); } - //if the switch attached to pin 3 is closed, release the right mouse button + //if the switch attached to pin 3 is closed, release the left mouse button if(digitalRead(3) == HIGH){ Mouse.release(); } diff --git a/Language/Functions/USB/Mouse/mouseRelease.adoc b/Language/Functions/USB/Mouse/mouseRelease.adoc index b2670d42a..00fab4bd6 100644 --- a/Language/Functions/USB/Mouse/mouseRelease.adoc +++ b/Language/Functions/USB/Mouse/mouseRelease.adoc @@ -65,11 +65,11 @@ void setup(){ } void loop(){ - //if the switch attached to pin 2 is closed, press and hold the right mouse button + //if the switch attached to pin 2 is closed, press and hold the left mouse button if(digitalRead(2) == HIGH){ Mouse.press(); } - //if the switch attached to pin 3 is closed, release the right mouse button + //if the switch attached to pin 3 is closed, release the left mouse button if(digitalRead(3) == HIGH){ Mouse.release(); }