records events from a device to a macro.
recordmacro <device> <macro> [stopkey] [recordDelay] [stopAfter]
recordDelay and stopAfter are not yet implemented.
the stop key will be disabled during recording because when pressed it stops recording.
if no stop key is provided, the ESC key will act as stop key.
recordmacro keyboard macro1
this records to the macro "macro1".