Reference.GetOemKey History

Hide minor edits - Show changes to output

October 20, 2012, at 05:18 PM by Scott Fitzgerald -
Changed line 37 from:
Serial.println(keyboard.getOemKey());
to:
Serial.println(keyboard.getOemKey());
October 20, 2012, at 05:18 PM by Scott Fitzgerald -
Changed lines 35-36 from:
void loop(){
usb.Task();
to:
void keyPressed() {
Added lines 39-42:

void loop(){
usb.Task();
}
October 20, 2012, at 05:16 PM by Scott Fitzgerald -
Changed lines 7-8 from:
Reports the OEM-code associated with a key pressed on a connected USB keyboard.
to:
Reports the OEM-code associated with a key pressed or released on a connected USB keyboard.
October 16, 2012, at 09:56 PM by Scott Fitzgerald -
Changed lines 7-8 from:
Reports the ASCII value of a key being pressed on an attached USB keyboard.
to:
Reports the OEM-code associated with a key pressed on a connected USB keyboard.
Changed lines 19-20 from:
int : the ASCII value of the key being pressed
to:
int : the OEM-code associated with the key being pressed
Changed lines 37-38 from:
Serial.write(keyboard.getKey());
Serial.println();
to:
Serial.print("OEM key: ");
Serial.println(keyboard.getOemKey());
October 16, 2012, at 09:54 PM by Scott Fitzgerald -
Added lines 1-48:
[[USBHost]] : ''KeyboardController'' class

!!getOemKey()

!!!!Description

Reports the ASCII value of a key being pressed on an attached USB keyboard.

!!!!Syntax

''keyboard''.getOemKey()

!!!!Parameters

none

!!!!Returns

int : the ASCII value of the key being pressed

!!!!Example
(:source lang=arduino tabwidth=4:)
#include <KeyboardController.h>

// Initialize USB Controller
USBHost usb;

// Attach Keyboard controller to USB
KeyboardController keyboard(usb);

void setup(){
Serial.begin(9600);
}

void loop(){
usb.Task();
Serial.write(keyboard.getKey());
Serial.println();
}
(:sourceend:)

!!!!See Also
*[[/Reference/KeyPressed | keyPressed]]()
*[[/Reference/KeyReleased | keyReleased]]()
*[[/Reference/GetKey | getKey]]()
*[[/Reference/GetOemKey | getOemKey]]()
*[[/Tutorial/KeyboardController]] example\\
\\

Share