Reference.MouseClick History

Hide minor edits - Show changes to output

April 27, 2012, at 10:33 PM by Scott Fitzgerald -
April 27, 2012, at 10:19 PM by Scott Fitzgerald -
Deleted line 46:
*[[/Reference/MouseClick | Mouse.click]]()
April 27, 2012, at 10:18 PM by Scott Fitzgerald -
Changed line 29 from:
(:code lang=arduino tabwidth=4:)
to:
(:source lang=arduino tabwidth=4:)
Changed lines 31-33 from:
pinMode(2, INPUT);
to:
pinMode(2,INPUT);
//initiate the Mouse library
Mouse.begin();
Changed lines 37-38 from:

//initiate the Mouse library when button is pressed
to:
//if the button is pressed, send a Right mouse click
Changed lines 39-41 from:
Mouse.begin();
}
to:
Mouse.click();
}
Changed lines 42-43 from:
(:codeend:)
to:

(:sourceend:)
April 27, 2012, at 10:16 PM by Scott Fitzgerald -
Added lines 28-51:
!!!!Example
(:code lang=arduino tabwidth=4:)
void setup(){
pinMode(2, INPUT);
}

void loop(){

//initiate the Mouse library when button is pressed
if(digitalRead(2) == HIGH){
Mouse.begin();
}

}
(:codeend:)

!!!!See also
*[[/Reference/MouseBegin | Mouse.begin]]()
*[[/Reference/MouseClick | Mouse.click]]()
*[[/Reference/MouseEnd | Mouse.end]]()
*[[/Reference/MouseMove | Mouse.move]]()
*[[/Reference/MousePress | Mouse.press]]()
*[[/Reference/MouseRelease | Mouse.release]]()
*[[/Reference/MouseIsPressed | Mouse.isPressed]]()
November 30, 2011, at 05:47 AM by Scott Fitzgerald -
Changed line 14 from:
Mouse.click();
to:
Mouse.click();\\
November 30, 2011, at 05:47 AM by Scott Fitzgerald -
Added lines 9-10:
Mouse.click() defaults to the left mouse button.
Added line 14:
Mouse.click();
November 30, 2011, at 05:44 AM by Scott Fitzgerald -
Changed lines 7-8 from:
Sends a momentary click to the computer at the location of the cursor.
to:
Sends a momentary click to the computer at the location of the cursor. This is the same as pressing and immediately releasing the mouse button.
November 30, 2011, at 05:39 AM by Scott Fitzgerald -
Changed lines 16-20 from:
button: which mouse button to press - ''int''
*Left button : 1
*Right button : 2
*Middle button : 4
to:
button: which mouse button to press - ''char''
*MOUSE_LEFT (default)
*MOUSE_RIGHT
*MOUSE_MIDDLE
November 30, 2011, at 04:00 AM by Scott Fitzgerald -
Changed lines 7-8 from:
Sends a click to the computer at the location of the cursor.
to:
Sends a momentary click to the computer at the location of the cursor.
November 30, 2011, at 03:59 AM by Scott Fitzgerald -
Deleted line 24:
[[Reference.HomePage | Reference Home]]
November 30, 2011, at 03:43 AM by Scott Fitzgerald -
Added lines 1-25:
[[Reference/MouseKeyboard | Mouse]]

!!Mouse.click()

!!!!Description

Sends a click to the computer at the location of the cursor.

WARNING: When you use the Mouse.click() command, the Arduino takes over your mouse! Make sure you have control before you use the command. A pushbutton to toggle the mouse control state is effective.

!!!!Syntax
Mouse.click(button);

!!!!Parameters

button: which mouse button to press - ''int''
*Left button : 1
*Right button : 2
*Middle button : 4

!!!!Returns

nothing

[[Reference.HomePage | Reference Home]]

Share