Added button R to turn on debug recording.

Might not compile.