Macros with input lag


#1

Just got my Model01. Eager to customize the layout with countless layers and sophisticated macros.
Perusing the forums and Kaleidoscope documentation, I don’t see instructions on how to do a useful thing.

I wish I could map a keypress to do this:
“Enter +(.002-.01 seconds of randomly-generated input lag)+ P +(.002-.01 seconds of randomly-generated input lag)+ u +(.002-.01 seconds of randomly-generated input lag)+ s +(.002-.01 seconds of randomly-generated input lag)+ h +(.002-.01 seconds of randomly-generated input lag)+ Spacebar +(.002-.01 seconds of randomly-generated input lag)+ T +(.002-.01 seconds of randomly-generated input lag)+ o +(.002-.01 seconds of randomly-generated input lag)+ p +(.002-.01 seconds of randomly-generated input lag)+ Enter”

Is this possible?


(Gergely Nagy) #2

At the moment, there isn’t an easy way to use random delays in a macro. You can use fixed delays, the I() and W() helpers do that. The first sets the interval between macro events, the second waits for the given amount of time (both use milliseconds).

If you want to use random intervals, that’s possible too, but a bit more involved…

void macroRandomType() {
  Macros.play(T(Enter));
  delay(random(100) + 2);
  Macros.play(T(P));
  delay(random(100) + 2);
  // and so on...
}

This can be made nicer, but it’ll do as an example. :slight_smile: