Loading...

Reference.KeyboardRelease History

Hide minor edits - Show changes to markup

April 27, 2012, at 06:24 PM by Scott Fitzgerald -
Changed lines 63-65 from:
to:
April 27, 2012, at 04:44 PM by Scott Fitzgerald -
Changed lines 55-56 from:


\\

to:
April 16, 2012, at 10:56 AM by Scott Fitzgerald -
Changed lines 18-20 from:

None

to:

int : the number of keys released

March 28, 2012, at 03:03 PM by Scott Fitzgerald -
Changed lines 7-8 from:

Lets go of specified key

to:

Lets go of the specified key. See Keyboard.press() for more information.

Changed lines 10-11 from:

Keyboard.release()

to:

Keyboard.release(key)

Added lines 14-17:

key : the key to release. char

Returns

Changed lines 20-22 from:

Returns

None\\

to:

Example

(:source lang=arduino:)

// use this option for OSX: char ctrlKey = KEY_LEFT_GUI; // use this option for Windows and Linux: // char ctrlKey = KEY_LEFT_CTRL;

void setup() {

  // make pin 2 an input and turn on the 
  // pullup resistor so it goes high unless
  // connected to ground:
  pinMode(2, INPUT_PULLUP);
  // initialize control over the keyboard:
  Keyboard.begin();

}

void loop() {

  while (digitalRead(2) == HIGH) {
    // do nothing until pin 2 goes low
    delay(500);
  }
  delay(1000);
  // new document:
  Keyboard.press(ctrlKey);
  Keyboard.press('n');
  delay(100);
  Keyboard.release(ctrlKey);
  Keyboard.release('n');
  // wait for new window to open:
  delay(1000);

}

(:sourceend:)

Added line 56:

\\

March 19, 2012, at 10:54 AM by Federico -
Changed lines 10-11 from:

Keyboard.releasel()

to:

Keyboard.release()

March 16, 2012, at 04:46 PM by Scott Fitzgerald -
Added lines 1-19:

Keyboard

Keyboard.release()

Description

Lets go of specified key

Syntax

Keyboard.releasel()

Parameters

None

Returns

None
\\




Bookmark and Share