now pauses when you switch tabs and records when you press r