Code for recording keypresses in processing