     else if(equalsBuffer(0,space,"STRING")){
       for(int i=space+1;i<bufSize;i++) KeyboardWrite(buf[i]);
     }
+    else if(equalsBuffer(0,space,"MOUSE")){
+      int nSpace = getSpace(space+1,bufSize);
+      int x = getInt(buf,space);
+      int y = getInt(buf,nSpace);
+      Mouse.move(x,y);
+      #ifdef debug 
+        Serial.println("Move mouse "+(String)x+" "+(String)y);
+      #endif
+    }
+    else if(equalsBuffer(0,space,"SCROLL")) Mouse.move(0,0,getInt(buf,space));
+    else if(equalsBuffer(0,space,"RANDOMMIN")) rMin = getInt(buf,space);
+    else if(equalsBuffer(0,space,"RANDOMMAX")) rMax = getInt(buf,space);
     else if(equalsBuffer(0,space,"REM") || equalsBuffer(0,space,"REPEAT")){}
     else{
       runCommand(0,space);

  return true;
}

bool equalsBuffer(int start, int end, char* str){ return equals(buf, start, end, str, String(str).length()); }

int getInt(char* str, int pos){
  String amount = String(str).substring(pos+1,pos+6);
  return amount.toInt();
}

void KeyboardWrite(uint8_t c){  


#include <SPI.h>
#include <SD.h>
#include <Keyboard.h>
#include <Mouse.h>

#define debug true // <-- uncomment to turn serial output on
#define CSpin 4 //Chip-Select of the SD-Card reader
