Loading...

Reference.MouseClick History

Hide minor edits - Show changes to markup

April 27, 2012, at 04:33 PM by Scott Fitzgerald -
April 27, 2012, at 04:19 PM by Scott Fitzgerald -
Deleted line 46:
April 27, 2012, at 04: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 04: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

November 29, 2011, at 11:47 PM by Scott Fitzgerald -
Changed line 14 from:

Mouse.click();

to:

Mouse.click();\\

November 29, 2011, at 11:47 PM by Scott Fitzgerald -
Added lines 9-10:

Mouse.click() defaults to the left mouse button.

Added line 14:

Mouse.click();

November 29, 2011, at 11:44 PM 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 29, 2011, at 11:39 PM 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 29, 2011, at 10:00 PM 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 29, 2011, at 09:59 PM by Scott Fitzgerald -
Deleted line 24:
November 29, 2011, at 09:43 PM by Scott Fitzgerald -
Added lines 1-25:

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 Home




Bookmark and Share