Arduino Function: Keyboard.begin

Description

This function starts emulating a keyboard connected to a computer.

Syntax

Keyboard.begin()

Returns

none 

Examples

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);
Keyboard.begin();
}

void loop() {
//if the button is pressed
if(digitalRead(2)==LOW){
//Send the message
Keyboard.print("Hello!");
}
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc