Loading...

Reference.MousePress History

Show minor edits - Show changes to markup

April 27, 2012, at 04:26 PM by Scott Fitzgerald -
Changed lines 30-31 from:
to:

(:source lang=arduino tabwidth=4:) void setup(){

  //The switch that will initiate the Mouse press
  pinMode(2,INPUT);
  //The switch that will terminate the Mouse press
  pinMode(3,INPUT);
  //initiate the Mouse library
  Mouse.begin();

}

void loop(){

  //if the switch attached to pin 2 is closed, press and hold the right mouse button
  if(digitalRead(2) == HIGH){
    Mouse.press();
  }
  //if the switch attached to pin 3 is closed, release the right mouse button
  if(digitalRead(3) == HIGH){
    Mouse.release();
  }

}

(:sourceend:)

April 27, 2012, at 04:20 PM by Scott Fitzgerald -
Changed lines 27-28 from:

nothing
\\

to:
March 28, 2012, at 02:33 PM by Scott Fitzgerald -
Added lines 9-10:

Before using Mouse.press(), you need to start communication with Mouse.begin().

December 06, 2011, at 07:29 PM by Scott Fitzgerald -
Changed lines 25-26 from:

nothing

to:

nothing
\\

December 06, 2011, at 07:28 PM by Scott Fitzgerald -
Deleted lines 25-26:
November 29, 2011, at 11:43 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Sends a button press to a connected computer. Mouse.press() defaults to a left button press.

to:

Sends a button press to a connected computer. A press is the equivalent of clicking and continuously holding the mouse button. A press is cancelled with Mouse.release().

Mouse.press() defaults to a left button press.

Changed lines 18-23 from:

button: which mouse button to press - int

  • Left button : 1 (default, when no argument given)
  • 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 09:59 PM by Scott Fitzgerald -
Changed lines 7-10 from:

Sends a button press to a connected computer. Mouse.press() defaults to a left buttons press.

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.

to:

Sends a button press to a connected computer. Mouse.press() defaults to a left button press.

WARNING: When you use the Mouse.press() 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.

November 29, 2011, at 09:46 PM by Scott Fitzgerald -
Changed lines 12-14 from:

Mouse.press(); mouse.press(button)

to:

Mouse.press();
Mouse.press(button)

November 29, 2011, at 09:46 PM by Scott Fitzgerald -
Added lines 1-26:

Mouse

Mouse.press()

Description

Sends a button press to a connected computer. Mouse.press() defaults to a left buttons press.

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.press(); mouse.press(button)

Parameters

button: which mouse button to press - int

  • Left button : 1 (default, when no argument given)
  • Right button : 2
  • Middle button : 4

Returns

nothing

Reference Home




Bookmark and Share