Skip to content

Commit 2842d2a

Browse files
committed
run testKeyboards only when in debug mode
1 parent 717ce87 commit 2842d2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

initPTB.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757

5858
%% Keyboard
59-
initKeyboard(cfg)
59+
initKeyboard
6060

6161

6262
%% Mouse
@@ -192,6 +192,8 @@ function initDebug(cfg)
192192
fprintf('########################################')
193193
fprintf('\n\n\n\n')
194194

195+
testKeyboards(cfg)
196+
195197
end
196198

197199
if cfg.testingTranspScreen
@@ -200,14 +202,12 @@ function initDebug(cfg)
200202

201203
end
202204

203-
function initKeyboard(cfg)
205+
function initKeyboard
204206

205207
% Make sure keyboard mapping is the same on all supported operating systems
206208
% Apple MacOS/X, MS-Windows and GNU/Linux:
207209
KbName('UnifyKeyNames');
208210

209-
testKeyboards(cfg)
210-
211211
% Don't echo keypresses to Matlab window
212212
ListenChar(-1);
213213

0 commit comments

Comments
 (0)