Bluetooth Rubber Ducky (https://forums.hak5.org/topic/41678-bluetooth-rubber-ducky/)

Dependencies:   BLE_API mbed nRF51822

Fork of microbit_presenter by micro:bit

  • Backspace = x08
  • (F5) = \x86
  • (F11) = \x8A
  • (F12) = \x8B
  • Print Screen = \x8C
  • Application Program Command (CTRL+8) \x9F
  • (‽)RALT LCTRL RSHIFT LSHIFT F1 LCTRL = \u203d + \u2038 (v.similar)
  • Down F1 LCTRL = \u2016
  • F1 F1 LCTRL = \u2000
  • LALT LSHIFT F2 LCTRL = \u206F
  • Insert = \x90
  • Home = \x91
  • Pageup = \x92
  • PageDown = \x93
  • Right Shift + Left Control = \uF8FF
  • Alt Shift + F (File >) = \x99
  • CTRL+B = \x98
  • Right Ctrl = \x9a
  • Escape + stuff, \x9d
  • Test on another PC (rwin) \x9c
  • Scroll = \x8d
  • Capslock = \x8e
  • Numlock = \x8f
  • Left = \x95
  • Right = \x94
  • Up = \x97
  • Down = \x96

Full list of special command characters here.

Revision:
3:dc7a04d715a2
Parent:
1:9e174f8fd9e9
--- a/keyboard_stream.cpp	Wed Aug 31 19:01:30 2016 +0000
+++ b/keyboard_stream.cpp	Mon Aug 21 12:24:51 2017 +0000
@@ -45,8 +45,8 @@
 BLE ble;
 KeyboardService *kbdServicePtr;
 
-static const char DEVICE_NAME[] = "micro:bit Presenter";
-static const char SHORT_DEVICE_NAME[] = "kbd1";
+static const char DEVICE_NAME[] = "micro:bit Rubber Ducky";
+static const char SHORT_DEVICE_NAME[] = "ducky";
 
 static void onDisconnect(const Gap::DisconnectionCallbackParams_t *params)
 {
@@ -82,12 +82,19 @@
     }
 }
 
+// Left = \x95
+// Right = \x94
+// Up = \x97
+// Down = \x96
+
+// Save a file with default name = "\x99,s,\n"
+
 void send_stuff() {
-    send_string("n");
+    send_string("\x99,s,\n");
 }
 
 void send_more_stuff() {
-    send_string("p");
+    send_string("\x8C");
 }
 
 int main()