Show minor edits - Show changes to markup
Serial.println(keyboard.getOemKey());
Serial.println(keyboard.getOemKey());
void loop(){
usb.Task();
void keyPressed() {
void loop(){
usb.Task();
}
Reports the OEM-code associated with a key pressed on a connected USB keyboard.
Reports the OEM-code associated with a key pressed or released on a connected USB keyboard.
Reports the ASCII value of a key being pressed on an attached USB keyboard.
Reports the OEM-code associated with a key pressed on a connected USB keyboard.
int : the ASCII value of the key being pressed
int : the OEM-code associated with the key being pressed
Serial.write(keyboard.getKey()); Serial.println();
Serial.print("OEM key: ");
Serial.println(keyboard.getOemKey());
USBHost : KeyboardController class
Reports the ASCII value of a key being pressed on an attached USB keyboard.
keyboard.getOemKey()
none
int : the ASCII value of the key being pressed
(:source lang=arduino tabwidth=4:)
// 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:)