Skip to content

Commit 22e1735

Browse files
committed
move together code related to keyboard settings
1 parent f9df886 commit 22e1735

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

Visual-loc_translational/setParameters.m

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@
2727
cfg.numTriggers = 4;
2828
cfg.eyeTracker = false; % Set to 'true' if you are testing in MRI and want to record ET data
2929

30-
31-
%% Keyboards
32-
33-
% cfg.responseBox would be the device used by the participant to give his/her response:
34-
% like the button box in the scanner or a separate keyboard for a behavioral experiment
35-
%
36-
% cfg.keyboard is the keyboard on which the experimenter will type or press the keys necessary
37-
% to start or abort the experiment.
38-
% The two can be different or the same.
39-
40-
% Using empty vectors should work for linux and MacOS when to select the
41-
% "main" keyboard. You might have to try some other values for Windows
42-
cfg.keyboard = [];
43-
cfg.responseBox = [];
44-
45-
4630
%% Engine parameters
4731

4832
% Monitor parameters
@@ -61,11 +45,24 @@
6145
cfg.textSize = 18;
6246
cfg.textStyle = 1;
6347

48+
%% Keyboards
49+
50+
% cfg.responseBox would be the device used by the participant to give his/her response:
51+
% like the button box in the scanner or a separate keyboard for a behavioral experiment
52+
%
53+
% cfg.keyboard is the keyboard on which the experimenter will type or press the keys necessary
54+
% to start or abort the experiment.
55+
% The two can be different or the same.
56+
57+
% Using empty vectors should work for linux and MacOS when to select the
58+
% "main" keyboard. You might have to try some other values for Windows
59+
cfg.keyboard = [];
60+
cfg.responseBox = [];
61+
6462
% Keyboard
6563
cfg.escapeKey = 'Escape';
6664

6765

68-
6966
% The code below will help you decide which keyboard device to use for the partipant and the experimenter
7067

7168
% Computer keyboard to quit if it is necessary
@@ -80,31 +77,31 @@
8077

8178

8279
switch lower(cfg.device)
83-
84-
80+
81+
8582
% this part might need to be adapted because the "default" device
8683
% number might be different for different OS or set up
87-
84+
8885
case 'pc'
89-
86+
9087
cfg.keyboard = [];
9188
cfg.responseBox = [];
92-
89+
9390
if ismac
9491
cfg.keyboard = [];
9592
cfg.responseBox = [];
9693
end
97-
94+
9895
case 'scanner'
99-
96+
10097
otherwise
101-
98+
10299
% Cfg.keyboard = max(Cfg.keyboardNumbers);
103100
% Cfg.responseBox = min(Cfg.keyboardNumbers);
104-
101+
105102
cfg.keyboard = [];
106103
cfg.responseBox = [];
107-
104+
108105
end
109106

110107
%% Experiment Design
@@ -159,4 +156,4 @@
159156
fprintf('######################################## \n')
160157
fprintf('## DEBUG MODE, NOT THE SCANNER CODE ## \n')
161158
fprintf('######################################## \n\n')
162-
end
159+
end

0 commit comments

Comments
 (0)