Hello! We want to use psychtoolbox to do an acoustic experiment, in which EEG signals of subjects are recorded throughout the experiment. During the experiment, the subjects will give some feedback (via keyboard) according to the stimulus content. However, during the experiment, the subject may touch the keyboard by mistake. We want to record every detail as much as possible (when the subject presses the key at any time, the program can send an “Event” to the EEG recorder through NetStation). Therefore, we want to know if there is any way to monitor the key situation in the background and send an “Event” to the EEG device while the main program is running.
The program in KbQueueDemo.m seems to be related to my needs, but how can I combine sending “Event” with pressing keys (without affecting the main program). Do I need to use multithreading?
Thank you very much!!!