File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,30 @@ You can then use the [matlab package manager](https://github.com/mobeets/mpm), t
7070 end
7171```
7272
73+ ## Setting up keyboards
74+
75+ To select a specific keyboard to be used by the experimenter or the participant, you need to know
76+ the value assigned by PTB to each keyboard device.
77+
78+ To know this copy-paste this on the command window:
79+
80+ ``` matlab
81+ [keyboardNumbers, keyboardNames] = GetKeyboardIndices;
82+
83+ disp(keyboardNumbers);
84+ disp(keyboardNames);
85+ ```
86+
87+ You can then assign a specific device number to the main keyboard or the response box in the ` cfg ` structure
88+
89+ - ` cfg.keyboard.responseBox ` would be the device number of the device used by the participant to give his/her
90+ response: like the button box in the scanner or a separate keyboard for a behavioral experiment
91+ - ` cfg.keyboard.keyboard ` would be the device number of the keyboard on which the experimenter will type or
92+ press the keys necessary to start or abort the experiment.
93+
94+ ` cfg.keyboard.responseBox ` and ` cfg.keyboard.keyboard ` can be different or the same.
95+
96+ Using empty vectors (ie ` [] ` ) or a negative value for those means that you will let PTB find and use the default device.
7397
7498## Structure and function details
7599
You can’t perform that action at this time.
0 commit comments