Skip to content

Commit 7dd40a0

Browse files
committed
fix mh and sphinx
1 parent 4400ab9 commit 7dd40a0

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

src/keyboard/getResponse.m

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
function responseEvents = getResponse(action, deviceNumber, cfg, getOnlyPress)
44
%
5-
% Wrapper function to use KbQueue. The queue will be listening to key presses on a keyboard device:
6-
% ``cfg.keyboard.responseBox`` or ``cfg.keyboard.keyboard`` are 2 main examples. When no deviceNumber
7-
% is set then it will listen to the default device. Check the ``CPP_getResponseDemo`` for a quick
8-
% script on how to use it.
5+
% Wrapper function to use KbQueue. The queue will be listening to key presses
6+
% on a keyboard device:
7+
% ``cfg.keyboard.responseBox`` or ``cfg.keyboard.keyboard`` are 2 main examples.
8+
% When no ``deviceNumber`` is set then it will listen to the default device.
9+
% Check the ``CPP_getResponseDemo`` for a quick script on how to use it.
910
%
10-
% USAGE:
11+
% USAGE::
1112
%
1213
% responseEvents = getResponse(action, deviceNumber, cfg, getOnlyPress)
1314
%
@@ -19,20 +20,25 @@
1920
% return when the keys were released (default=true). See the section on
2021
% `Returns` below for more info
2122
%
22-
% :returns: - :responseEvents: returns all the keypresses and return them as a structure with field names that make it easier to save the output of in a BIDS format
23+
% :returns:
2324
%
24-
% - ``responseEvents.onset`` this is an absolute value and you should substract the "experiment start time" to get a value relative to when the experiment was started.
25+
% - :responseEvents: returns all the keypresses and return them
26+
% as a structure with field names that make it easier
27+
% to save the output of in a BIDS format
2528
%
26-
% - ``responseEvents.trial_type = response``
29+
% - ``responseEvents.onset`` this is an absolute value and you should substract
30+
% the "experiment start time" to get a value relative to when the experiment was started.
2731
%
28-
% - ``responseEvents.duration = 0``
32+
% - ``responseEvents.trial_type = response``
2933
%
30-
% - ``responseEvents.keyName`` the name of the key pressed
34+
% - ``responseEvents.duration = 0``
3135
%
32-
% - ``responseEvents(iEvent,1).pressed`` if
36+
% - ``responseEvents.keyName`` the name of the key pressed
3337
%
34-
% - pressed == 1 --> the key was pressed
35-
% - pressed == 0 --> the key was released
38+
% - ``responseEvents(iEvent,1).pressed`` if
39+
%
40+
% - ``pressed == 1`` --> the key was pressed
41+
% - ``pressed == 0`` --> the key was released
3642
%
3743
% ---
3844
%
@@ -42,11 +48,16 @@
4248
%
4349
% - ``start`` to start listening to keypresses
4450
%
45-
% - ``check`` checks all the key presses events since 'start', or since last 'check' or 'flush' (whichever was the most recent)
51+
% - ``check`` checks all the key presses events since 'start', or since last 'check'
52+
% or 'flush' (whichever was the most recent)
53+
%
54+
% - can check for demand to abort if the ``escapeKey`` is listed in the Keys of interest
55+
%
56+
% - can only check for demands to abort when ``getResponse('check')`` is called
57+
% so there will be a delay between the key press and the experiment stopping
4658
%
47-
% - can check for demand to abort if the ``escapeKey`` is listed in the Keys of interest
48-
% - can only check for demands to abort when ``getResponse('check')`` is called so there will be a delay between the key press and the experiment stopping
49-
% - abort errors send specific signals that allow the catch to get them and allows us to "close" nicely
59+
% - abort errors send specific signals that allow the catch to get them and allows us
60+
% to "close" nicely
5061
%
5162
% - ``flush`` empties the queue of events in case you want to restart from a clean queue
5263
%

src/readAndFilterLogfile.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
% :type filterBy: string
2020
% :param varargin: either ``cfg`` (to display the last run output) or the file path as string
2121
%
22-
% :returns:
22+
% :returns:
2323
%
24-
% - :outputFiltered: dataset with only the specified content to see it in the
24+
% - :outputFiltered: dataset with only the specified content to see it in the
2525
% command window use display(outputFiltered)
2626
%
2727
%

0 commit comments

Comments
 (0)