Loading...

Reference.MouseRelease History

Hide minor edits - Show changes to markup

April 27, 2012, at 04:27 PM by Scott Fitzgerald -
Deleted line 25:

Example

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

Example

(: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:)

Changed line 56 from:
to:
April 27, 2012, at 04:20 PM by Scott Fitzgerald -
Added lines 25-34:
March 27, 2012, at 07:03 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Sends a message that a previously pressed button (invoked through Mouse.press())is released. Mouse.release() defaults to the left button.

to:

Sends a message that a previously pressed button (invoked through Mouse.press()) is released. Mouse.release() defaults to the left button.

December 06, 2011, at 07:28 PM by Scott Fitzgerald -
Deleted line 24:
November 29, 2011, at 11:46 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Sends a message that a previously pressed button is released. Mouse.release() defaults to the left button.

to:

Sends a message that a previously pressed button (invoked through Mouse.press())is released. Mouse.release() defaults to the left button.

November 29, 2011, at 11:45 PM by Scott Fitzgerald -
Changed lines 16-21 from:

button: which mouse button to release - int

  • Left button : 1 (default)
  • 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:48 PM by Scott Fitzgerald -
Added lines 1-26:

Mouse

Mouse.release()

Description

Sends a message that a previously pressed button is released. Mouse.release() defaults to the left button.

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

Parameters

button: which mouse button to release - int

  • Left button : 1 (default)
  • Right button : 2
  • Middle button : 4

Returns

nothing

Reference Home




Bookmark and Share