USB Keyboard and mouse Example. Based on USBMouse

Dependencies:   mbed

Fork of USBKeyboardMouse by Zack Clobes

Revision:
1:9c83250ce43b
Parent:
0:86603687efec
--- a/main.cpp	Tue Jan 18 02:16:00 2011 +0000
+++ b/main.cpp	Wed May 08 09:33:27 2013 +0000
@@ -1,17 +1,21 @@
 #include "mbed.h"
-#include "USBMouse.h"
 #include "USBKeyboard.h"
 
 DigitalOut led(LED1);
-USBMouse mouse;
+DigitalIn Centre(p14);
+DigitalIn Bas(p12);
 USBKeyboard keyboard;
 
-int main() {
+int main()
+{
     while(1) {
-        mouse.move(18, 10);     //moves the mouse down and to the left
-        keyboard.sendKeys("foo");     //sends the word "foo" through the keyboard
-
-        led = !led;     //cycles the LED on/off
-        wait(2);        //waits 2 seconds, then repeats
+        if (Centre) {
+            keyboard.sendKeys("q");
+            wait(0.2);
+        }
+        if (Bas) {
+            keyboard.sendKeys("g");
+            wait(0.2);
+        }
     }
-}
+}
\ No newline at end of file